-
Notifications
You must be signed in to change notification settings - Fork 992
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 exception tag in DefaultMongoCommandTagsProvider #4978
Comments
Thanks for opening the issue. I think you're the first person to ask for it, but we could certainly consider this enhancement. Not directly related to what you mentioned, but another consideration is that our MongoDB client instrumentation still doesn't use the |
@shakuzen thanks for the quick reply, I am aware of the observation offered by spring data for the mongo commands, but it appears a bit cumbersome at the moment. Compared to the spring data repository observation, the one for commands is not capable of extending the
Overall the whole configuration is a bit awkward, whereas the |
@shakuzen do you think it can go into 1.13.0 by 13 of May? by having such helper methods e.g.
|
Typically, we would not merge enhancements for a feature release after a release candidate has been made available. 1.13.0-RC1 is already out. The proposed change sounds low risk enough, but the workaround - provide your own tags provider extending the default one - is also easy enough. Could you not use a custom tags provider until 1.14.0 if we included this enhancement there? Would you also be interested in contributing a pull request for this? |
Thanks for letting me know, I agree with you and there is no urgency for 1.13, it was just an informational question. As of the PR contribution, currently I am not able to involve myself on that level 😐 |
Thanks for the quick response. We'll aim to get this included in 1.14 then. |
Other metrics appear to have default error/exception tags, the
mongodb.driver.commands
one not.Even though a
throwable
is defined in theCommandFailedEvent
it is not utilized for the default tags:Other standard metrics like
spring.data.repository.invocations
,http.server/client.requests
on the other hand are having the error/exception as default, e.g. spring'sDefaultRepositoryTagsProvider
:I see that exception is a custom tag name, which is used by spring and error appears to be the one from micrometer, and in the end it does not matter, both or either one would be fine, but none of them appears kind of missing.
As a workaround, I could define my custom tag provider and push the tag myself whenever the event is of type
CommandFailedEvent
(for the time being), but out of the box here would be more feasible in my eyes.The text was updated successfully, but these errors were encountered: