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 service endpoint metric like the one provided in v1 SDK #2579

Closed
4423 opened this issue Jul 8, 2021 · 2 comments · Fixed by #4307
Closed

Add service endpoint metric like the one provided in v1 SDK #2579

4423 opened this issue Jul 8, 2021 · 2 comments · Fixed by #4307
Labels
feature-request A feature should be added or improved. p3 This is a minor priority issue sdk-metrics

Comments

@4423
Copy link

4423 commented Jul 8, 2021

Describe the Feature

In v1, AWS SDK request metrics included service endpoint metric which can be used to identify a service.
It would be nice to have this in v2 SDK as well.

Below are the concrete code to get this metric in v1 and the expected code in v2.

// v1
class SampleRequestMetricCollector : RequestMetricCollector() {
    override fun collectMetrics(request: Request<*>, response: Response<*>) {
        val metrics = request.awsRequestMetrics
        val serviceEndpoints = metrics.getProperty(AWSRequestMetrics.Field.ServiceEndpoint)
        ...
    }
}
// v2
class SampleMetricPublisher : MetricPublisher {
    override fun publish(metricCollection: MetricCollection) {
        val serviceEndpoints = metricCollection.metricValues(CoreMetric.SERVICE_ENDPOINT)
        ...
    }
}

Is there any solution to get a metric corresponds to the service endpoint in v2?
In particular, I want to know the bucket name of S3 included in the service endpoint.

Your Environment

  • AWS Java SDK version used: 2.16.92
  • JDK version used: 11
  • Operating System and version: macOS Catalina
@4423 4423 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jul 8, 2021
@debora-ito
Copy link
Member

@4423 thank you for reaching out. This is a reasonable feature to add since it's available in v1.

@debora-ito debora-ito added sdk-metrics and removed needs-triage This issue or PR still needs to be triaged. labels Jul 13, 2021
@yasminetalby yasminetalby added the p3 This is a minor priority issue label Nov 28, 2022
aws-sdk-java-automation added a commit that referenced this issue Jun 1, 2023
…009f2be74

Pull request: release <- staging/8115f4fc-04cc-4235-921a-6d4009f2be74
@dagnir dagnir mentioned this issue Aug 15, 2023
12 tasks
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. p3 This is a minor priority issue sdk-metrics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants