-
Notifications
You must be signed in to change notification settings - Fork 149
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
Feature request: remove service_undefined
from default dimensions
#3374
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Hi @akshuc96, The default behavior of Metrics is to add a This is not something we intend to change, so we will continue with this default as we believe it constitutes a sensible default. What we can consider changing instead is what happens when customers don't specify a service name using either of the two methods above. Currently, if you don't set a service name, the Metrics utility will set the
This is something we implemented this way mainly for consistency, but I can see how it adds little value, so I agree we should consider changing. Since this is a default, changing it requires a potentially breaking change and thus, we can do this only in our next major version - for which we don't yet have a date. Besides adding this item to our v3 discussion, as a temporary solution, you can call import { Metrics } from '@aws-lambda-powertools/metrics';
const metrics = new Metrics({ namespace: 'my-app' });
metrics.clearDefaultDimensions();
export const handler = async () => {
// ...
}; cc @aws-powertools/lambda-python-core & @aws-powertools/lambda-dotnet-core - you might want to consider this same change in case you're doing the same. |
We are still committed to do this in the next major version - I have added the item to the discussion and the corresponding label. If you find this item useful please feel free to add a 👍 to the original post above. |
service_undefined
from default dimensions
Use case
The customers may not want to publish the service as a dimension, because they are is using other dimensions.
Solution/User Experience
Remove default dimension as service in the powertools
Alternative solutions
Acknowledgment
Future readers
Please react with 👍 and your use case to help us understand customer demand.
The text was updated successfully, but these errors were encountered: