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 AppRunner default config for X-Ray integration #647

Merged
merged 1 commit into from
Oct 25, 2021

Conversation

mxiamxia
Copy link
Member

@mxiamxia mxiamxia commented Sep 16, 2021

Description: Describe what has changed.
Add AppRunner default config for X-Ray integration

@codecov-commenter
Copy link

codecov-commenter commented Sep 16, 2021

Codecov Report

Merging #647 (8714331) into main (ffe42a2) will decrease coverage by 0.16%.
The diff coverage is 100.00%.

❗ Current head 8714331 differs from pull request most recent head 27dc3ef. Consider uploading reports for the commit 27dc3ef to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #647      +/-   ##
==========================================
- Coverage   64.54%   64.38%   -0.17%     
==========================================
  Files           8        8              
  Lines         220      219       -1     
==========================================
- Hits          142      141       -1     
  Misses         62       62              
  Partials       16       16              
Impacted Files Coverage Δ
pkg/defaultcomponents/defaults.go 82.45% <ø> (-0.31%) ⬇️
pkg/logger/logger.go 80.55% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ffe42a2...27dc3ef. Read the comment docs.

@@ -52,6 +52,7 @@ COPY --from=build /workspace/config/eks/prometheus/config-all.yaml /etc/eks/prom
COPY --from=build /workspace/config/ecs/container-insights/otel-task-metrics-config.yaml /etc/ecs/container-insights/otel-task-metrics-config.yaml
COPY --from=build /workspace/config/ecs/ecs-default-config.yaml /etc/ecs/ecs-default-config.yaml
COPY --from=build /workspace/config/ecs/otel-instance-metrics-config.yaml /etc/ecs/otel-instance-metrics-config.yaml
COPY --from=build /workspace/config/apprunner/apprunner-xray-config.yaml /etc/ecs/apprunner-xray-config.yaml

Choose a reason for hiding this comment

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

Recommend to rephrase. /etc/ecs/apprunner-xray-config.yaml to /etc/apprunner/apprunner-xray-config.yaml

Copy link
Member Author

Choose a reason for hiding this comment

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

updated

Comment on lines 22 to 23
limit_percentage: 40 # 40% of total allocated memory
spike_limit_percentage: 8 # 100 * 40% * 20% = 8%: 20 percent from the total limited memory
Copy link
Member Author

Choose a reason for hiding this comment

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

ECS Task total allocated Mem: 1000MB Max

limit_percent(hard): 40% = 400MB - hard limit threshold

spike limit(soft): 8% = 1000MB * 40% * 20% = 320MB - soft limit threshold

Both will drop data. Hard limit will perform GCs more frequently

Copy link

@yimipeng yimipeng Oct 4, 2021

Choose a reason for hiding this comment

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

Reviewed default-config with our Product Manager Akshay and got sign-off on 10/4. 40% memory limit percentage works for him based on today’s App Runner resource quota and adot known performance cost.
@mxiamxia Please kindly let us know what’s the next step for this config setup from ADOT side.

@@ -52,6 +52,7 @@ COPY --from=build /workspace/config/eks/prometheus/config-all.yaml /etc/eks/prom
COPY --from=build /workspace/config/ecs/container-insights/otel-task-metrics-config.yaml /etc/ecs/container-insights/otel-task-metrics-config.yaml
COPY --from=build /workspace/config/ecs/ecs-default-config.yaml /etc/ecs/ecs-default-config.yaml
COPY --from=build /workspace/config/ecs/otel-instance-metrics-config.yaml /etc/ecs/otel-instance-metrics-config.yaml
COPY --from=build /workspace/config/apprunner/apprunner-xray-config.yaml /etc/apprunner/apprunner-xray-config.yaml
Copy link

Choose a reason for hiding this comment

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

Nit: this is just for my knowledge, trying to make the config generic. should we call it apprunner-default-config.yaml instead or apprunner-otel-config.yaml since in future apprunner will support not only xray as trace destination.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree it is a valid point. changed.

grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:55681
Copy link
Contributor

Choose a reason for hiding this comment

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

If this feature hasn't been released yet, is there any way we can use the official 4318 port for this instead of this legacy one?

Copy link
Member Author

Choose a reason for hiding this comment

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

do you know if OTel SDK has updated its default HTTP port to 4318 yet? I previously only updated OTel SDK for gRPC on new port. Thanks

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure across all the languages, java uses it as default as of release coming out this week.

Perhaps this needs to be configured for both 4318 and 55681 temporarily to handle older and newer SDKs.

Copy link
Contributor

Choose a reason for hiding this comment

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

@mxiamxia Do you think you could add both ports? So we can get this closed out, and handle the remaining tasks ourselves.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is app runner a sidecar deployment? The default without specifying an endpoint is to listen on localhost on old and new ports. For sidecar we shouldn't define an endpoint. Otherwise we should probably set two receivers

If min doesn't get back I can make the change Monday if I know that.

Copy link
Contributor

@willarmiros willarmiros Oct 15, 2021

Choose a reason for hiding this comment

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

It will be a sidecar deployment of the collector.

For sidecar we shouldn't define an endpoint.

Why is this?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we can remove these defined (default) endpoints and have the collector pickup it's default endpoints. Collector will support the new port and legacy ports in the receiver.
https://github.com/open-telemetry/opentelemetry-collector/blob/main/receiver/otlpreceiver/otlp.go#L146

Copy link
Member

@jefchien jefchien left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@willarmiros willarmiros left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@alolita alolita left a comment

Choose a reason for hiding this comment

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

Was this config tested? Please verify with William and Yiming. Thx.

@mxiamxia mxiamxia merged commit 7f3f4d5 into aws-observability:main Oct 25, 2021
@mxiamxia
Copy link
Member Author

Was this config tested? Please verify with William and Yiming. Thx.

Yes, Yiming has tested and approved the PR.

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.

None yet

7 participants