Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add database tag to DefaultMongoCommandTagsProvider #4298

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

nathankooij
Copy link
Contributor

The MongoDB Java driver added the databaseName field to commands in 4.11. We can expose this via the DefaultMongoCommandTagsProvider. While there, I've also replaced usage of deprecated constructors.

@nathankooij
Copy link
Contributor Author

I see the builds fail on some deprecation warnings in unrelated code. What is the recommended approach for moving forward here?

@jonatan-ivanov
Copy link
Member

jonatan-ivanov commented Oct 31, 2023

Thank you for the PR!

The build is not failing because of deprecation warnings, the build fails on errors:

1 error
8 warnings

Those 8 warnings do not make the build fail, that 1 error does:

/home/circleci/micrometer/docs/src/test/java/io/micrometer/docs/observation/ObservationInstrumentingTests.java:463: error: incompatible types: try-with-resources not applicable to variable type
        try (Javalin javalin = Javalin.create().before("/hello/{name}", ctx -> {
                     ^
    (Javalin cannot be converted to AutoCloseable)

This still seems to be unrelated to your changes and if this is failing, main should too, I'm checking it.

@jonatan-ivanov
Copy link
Member

Should be fixed (see #4299), could you please rebase your changes on main?

@nathankooij
Copy link
Contributor Author

Should be fixed (see #4299), could you please rebase your changes on main?

Thanks for pointing out & fixing the issue. I've rebased my branch.

@shakuzen shakuzen added enhancement A general enhancement module: micrometer-core An issue that is related to our core module labels Jan 17, 2024
@shakuzen shakuzen added this to the 1.13.0-M1 milestone Jan 17, 2024
@shakuzen shakuzen merged commit 64c9416 into micrometer-metrics:main Jan 17, 2024
5 checks passed
@shakuzen
Copy link
Member

@nathankooij Thank you for the contribution. It will be in the upcoming 1.13.0-M1 milestone release.

@izeye
Copy link
Contributor

izeye commented Mar 19, 2024

It seems that "database" tag should have been added through #2932, #3069, and 8d9db81. The release note for 1.10.0-M1 contains the entry, but v1.10.0-M1 tag itself doesn't contain the changes. Given that #3069 had the "2.0.0-M4" milestone, it seems to have been lost when changing from 2.x to 1.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A general enhancement module: micrometer-core An issue that is related to our core module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants