Skip to content

Support AppSignals metrics transport protocol configuration. #70

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

Merged
merged 2 commits into from
Feb 23, 2024

Conversation

zzhlogin
Copy link
Contributor

@zzhlogin zzhlogin commented Feb 22, 2024

Issue #, if available:

This PR is matching the aws-otel-java-instrumentation PR to support both http and grpc protocol according the environment variables.

Testing:
I test the change on EC2 instance using the CWAgent receiving the metrics and traces by running on two sets of environment variables:

  1. http:
export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_METRICS_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4316/v1/traces
export OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT=http://localhost:4316/v1/metrics
  1. grpc:
export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc
export OTEL_EXPORTER_OTLP_METRICS_PROTOCOL=grpc
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4315
export OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT=http://localhost:4315

I has been confirmed that both the traces and metrics are received successfully, logs and service map shows up in the console:
Screenshot 2024-02-23 at 11 35 39 AM

Screenshot 2024-02-23 at 11 36 11 AM

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@wangzlei wangzlei self-requested a review February 23, 2024 20:58
Copy link
Contributor

@wangzlei wangzlei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@wangzlei wangzlei merged commit 5a37897 into main Feb 23, 2024
@wangzlei wangzlei deleted the protocol branch February 23, 2024 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants