-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[exporter/awsemf] Add StorageResolution config to support high-resolution metrics #29506
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
More information on storage resolution can be found here for anyone interested. @bviolier what is your idea for the configuration changes necessary to support this? We would need to be able to specify metrics by their name and then give them an associated storage resolution right? I could see how this could be a useful feature but understanding the configuration required for it first would be a good start. |
Thanks for the quick reply @bryan-aguilar. I created a PR for it. I chose to put it at the same level as things like Also, I am assuming (as was done before, I believe) that people can create multiple exporters if they want different settings for different metrics. If you think it should look different, let me know. I'll try to devise a different way of setting this configuration value. |
I had thought about how we could adopt storage resolution in the past and I thought that having a global I think it would behoove us to consider other options for this. Here are two thoughts that come to mind
|
You replied on the PR saying you think it shouldn't be a top-level configuration (like I suggested above). The other option I can think of is making it part of The downside is that it does force you to define the metrics in An example would then look like this: exporters:
awsemf:
log_group_name: '/containers/{ClusterName}/performance'
log_stream_name: '{TaskId}'
dimension_rollup_option: NoDimensionRollup
metric_declarations:
- dimensions: [ [ ClusterName, TaskDefinitionFamily ] ]
storage_resolution: 1,
metric_name_selectors:
- MemoryUtilized
- MemoryReserved
- CpuUtilized
- CpuReserved |
I think doing an attribute might get hairy pretty quickly indeed. It does give you the power on the client to force specific metrics into high-resolution, but in our case, we specifically wouldn't want the client to have that power (that being said, that can easily be fixed with filters also). The |
Putting it as part of metric declarations may be a good idea also. It may be even more appropriate then my suggestion also. Putting it within the metric declarations object would give more flexibility.
Agreed, but I think this is an acceptable tradeoff when comparing the user experience of a top level
I think it's fine to strike that idea, especially if it does not fit your use case. I have not heard a request for this either and was just throwing out ideas. The good thing is that this can always be added in the future if we do get a feature request for this functionality.
This is a good call out and I don't know the exact reasoning for that. I can see if I can find out though. We shouldn't back ourselves into a corner right away if there's the chance that there could be additional values in the future. |
I am up for updating the PR with either the array option (assuming true/false is ok) or going the On our side, we are now testing this on sandbox (with the current PR) and our Alarm for auto-scaling ECS containers went from 220+ seconds to between 40 and 50 seconds after load increase. |
I may need to think on this a bit more but I'm leaning toward making this a configurable part of the There is also another option we hadn't considered. There is a metrics descriptor configuration option. It seems appropriate that storage resolution should be included in that. |
The Metrics Descriptor is interesting indeed! I was thinking though that the metric-directive also gives you the option to store the same metric in different resolutions when using different dimensions - which is also an interesting case. Just let me know when you have come to a conclusion and I will pick this up again. No hurry from my side, as we can already use it by building our own collector. |
I think both capabilities can work together. There may be times when using the But also having the ability to configure it per metric/dimension set is useful. Also, I think if a storage resolution for a metric is configured in both the |
It sounds like a good plan to implement in both, indeed. I would, however, have it the other way around. The |
I see your point and I agree that it would make more sense to have the directive field take precedence. Thanks you for the feedback! |
I did a first pass for moving the storage resolution. Please let me know what you think, I had to dive deep a bit for the declaration to work, but I got something working. Open to improve, of course. I didn't test it locally, but I updated the tests. |
@bryan-aguilar it seems the PR has been closed due to inactivity. Do you know when you have some time to review and get this merged? Thanks! |
@bryan-aguilar any updates on this? I'd love to help if there's anything needed, we're desperate for this functionality! |
@Aneurysm9 @shaochengwang @mxiamxia @bryan-aguilar |
@Aneurysm9 @shaochengwang @mxiamxia @bryan-aguilar |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
@bryan-aguilar this feature is still needed by users of opentelemetry. Is there any update on its implementation? |
…36057) This change implements the capability for users of the AWS EMF Exporter to specify which metrics they would like to have sent to CloudWatch with a 1 second Storage Resolution. The EMF Exporter now explicitly states the Storage Resolution for each metric as 60 seconds, the previous implicit default, so there is no behavior change. If the user specifies a metric to have 1 second resolution it will be sent to CloudWatch EMF with the Storage Resolution set accordingly. #### Description Previously the AWS EMF Exporter sent metric data into CloudWatch without specifying the storage resolution. CloudWatch would then default to a 60 second storage resolution, even if metrics are sent more frequently than every 60 seconds. This would confuse users when they try to apply functions like AVG, SUM, MAX, or MIN to their metrics with a period of 5 seconds. The function would be applied by CloudWatch to 60 seconds worth of data and produced unexpected results and confusion for the user. This commit makes this 60 second resolution explicit in the messages sent to CloudWatch by the EMF Exporter and also gives the user the option to specify a more granular 1 second resolution per metric in the configuration file of the AWS EMF Exporter. #### Link to tracking issue Fixes #29506 #### Testing Added tests to verify that config file parsing validates a metric descriptor that specifies either a valid unit, valid storage resolution, or both and rejects other invalid metric descriptors. Added tests that the translation from metric data to CW EMF carries a storage resolution with it, defaulting to a value of 60 (current behavior) if no storage resolution valid is explicitly set in the configuration. #### Documentation Comments added in the code but have not updated the README.md pending acceptance of the PR.
…pen-telemetry#36057) This change implements the capability for users of the AWS EMF Exporter to specify which metrics they would like to have sent to CloudWatch with a 1 second Storage Resolution. The EMF Exporter now explicitly states the Storage Resolution for each metric as 60 seconds, the previous implicit default, so there is no behavior change. If the user specifies a metric to have 1 second resolution it will be sent to CloudWatch EMF with the Storage Resolution set accordingly. #### Description Previously the AWS EMF Exporter sent metric data into CloudWatch without specifying the storage resolution. CloudWatch would then default to a 60 second storage resolution, even if metrics are sent more frequently than every 60 seconds. This would confuse users when they try to apply functions like AVG, SUM, MAX, or MIN to their metrics with a period of 5 seconds. The function would be applied by CloudWatch to 60 seconds worth of data and produced unexpected results and confusion for the user. This commit makes this 60 second resolution explicit in the messages sent to CloudWatch by the EMF Exporter and also gives the user the option to specify a more granular 1 second resolution per metric in the configuration file of the AWS EMF Exporter. #### Link to tracking issue Fixes open-telemetry#29506 #### Testing Added tests to verify that config file parsing validates a metric descriptor that specifies either a valid unit, valid storage resolution, or both and rejects other invalid metric descriptors. Added tests that the translation from metric data to CW EMF carries a storage resolution with it, defaulting to a value of 60 (current behavior) if no storage resolution valid is explicitly set in the configuration. #### Documentation Comments added in the code but have not updated the README.md pending acceptance of the PR.
…pen-telemetry#36057) This change implements the capability for users of the AWS EMF Exporter to specify which metrics they would like to have sent to CloudWatch with a 1 second Storage Resolution. The EMF Exporter now explicitly states the Storage Resolution for each metric as 60 seconds, the previous implicit default, so there is no behavior change. If the user specifies a metric to have 1 second resolution it will be sent to CloudWatch EMF with the Storage Resolution set accordingly. #### Description Previously the AWS EMF Exporter sent metric data into CloudWatch without specifying the storage resolution. CloudWatch would then default to a 60 second storage resolution, even if metrics are sent more frequently than every 60 seconds. This would confuse users when they try to apply functions like AVG, SUM, MAX, or MIN to their metrics with a period of 5 seconds. The function would be applied by CloudWatch to 60 seconds worth of data and produced unexpected results and confusion for the user. This commit makes this 60 second resolution explicit in the messages sent to CloudWatch by the EMF Exporter and also gives the user the option to specify a more granular 1 second resolution per metric in the configuration file of the AWS EMF Exporter. #### Link to tracking issue Fixes open-telemetry#29506 #### Testing Added tests to verify that config file parsing validates a metric descriptor that specifies either a valid unit, valid storage resolution, or both and rejects other invalid metric descriptors. Added tests that the translation from metric data to CW EMF carries a storage resolution with it, defaulting to a value of 60 (current behavior) if no storage resolution valid is explicitly set in the configuration. #### Documentation Comments added in the code but have not updated the README.md pending acceptance of the PR.
…pen-telemetry#36057) This change implements the capability for users of the AWS EMF Exporter to specify which metrics they would like to have sent to CloudWatch with a 1 second Storage Resolution. The EMF Exporter now explicitly states the Storage Resolution for each metric as 60 seconds, the previous implicit default, so there is no behavior change. If the user specifies a metric to have 1 second resolution it will be sent to CloudWatch EMF with the Storage Resolution set accordingly. #### Description Previously the AWS EMF Exporter sent metric data into CloudWatch without specifying the storage resolution. CloudWatch would then default to a 60 second storage resolution, even if metrics are sent more frequently than every 60 seconds. This would confuse users when they try to apply functions like AVG, SUM, MAX, or MIN to their metrics with a period of 5 seconds. The function would be applied by CloudWatch to 60 seconds worth of data and produced unexpected results and confusion for the user. This commit makes this 60 second resolution explicit in the messages sent to CloudWatch by the EMF Exporter and also gives the user the option to specify a more granular 1 second resolution per metric in the configuration file of the AWS EMF Exporter. #### Link to tracking issue Fixes open-telemetry#29506 #### Testing Added tests to verify that config file parsing validates a metric descriptor that specifies either a valid unit, valid storage resolution, or both and rejects other invalid metric descriptors. Added tests that the translation from metric data to CW EMF carries a storage resolution with it, defaulting to a value of 60 (current behavior) if no storage resolution valid is explicitly set in the configuration. #### Documentation Comments added in the code but have not updated the README.md pending acceptance of the PR.
Component(s)
exporter/awsemf
Is your feature request related to a problem? Please describe.
We want to be able to push high-resolution metrics from the opentelemetry-collector. This means that we should be able to set StorageResolution to 1.
Describe the solution you'd like
Have the option in the AWSEMF config to turn on high-resolution metrics through the StorageResolution config.
Describe alternatives you've considered
There doesn't seem to be another way of doing this, except for creating a new exporter that uses either this setting, or directly uses PutMetricData, which would mean a completely new exporter.
Additional context
I will be creating a PR soon.
The text was updated successfully, but these errors were encountered: