-
Notifications
You must be signed in to change notification settings - Fork 14
Add scripts to publish Java tracer layer. Also add code to set the correct tags in traces #26
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
Conversation
scripts/list_layers.sh
Outdated
|
|
||
| set -e | ||
|
|
||
| LAYER_NAMES=("Datadog-Python27" "Datadog-Python36" "Datadog-Python37" "Datadog-Python38") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these the correct layer names?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 deleted the unused line
|
…aDog/datadog-lambda-java into chris.agocs/deploy_java_tracer_layer
|
Added code signing and test-layer-publishing. I'm going to defer on add new regions for now, in the interest of wanting to release this version so that @Hesperide can start testing again |
scripts/list_layers.sh
Outdated
|
|
||
| if [ ${#LAYERS_MISSING_REGIONS[@]} -gt 0 ]; then | ||
| echo "WARNING: Following regions missing layers: ${LAYERS_MISSING_REGIONS[@]}" | ||
| echo "Please run ./add_new_region.sh <new_region> to add layers to the missing regions" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mentioned that you weren't going to add the add_new_region script yet, so I would take this out for now
scripts/list_layers.sh
Outdated
| # Copyright 2019 Datadog, Inc. | ||
|
|
||
| # Lists most recent layers ARNs across regions to STDOUT | ||
| # Optionals args: [layer-name] [region] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optionals -> optional
Also, is layer-name really an arg? It looks like it's hardcoded as dd-trace-java
nhinsch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, just a couple of suggestions
|
I would also reiterate my suggestion of bringing over the add new region script. It's probably not too hard since it's already written, and I suspect we'll need it soon enough, so we might as well get it out of the way now. But everything here looks good. |
scripts/sign_layers.sh
Outdated
|
|
||
| if [ -z "$2" ] | ||
| then | ||
| echo "Usage: ./sign_layers (staging|prod) layer_file.zip" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be (sandbox|prod)
scripts/sign_layers.sh
Outdated
| aws s3api delete-object --bucket $S3_BUCKET_NAME --key $S3_SIGNED_ZIP_KEY | ||
|
|
||
| echo | ||
| echo "Successfully signed all layers!" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all layers -> the layer (for this repo)
| } | ||
| Span span = GlobalTracer.get().activeSpan(); | ||
| if (span != null) { | ||
| span.setTag("request_id", requestId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the other libraries add function_version and resource_names tags as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
What does this PR do?
This PR adds a script that publishes dd-trace-java as a lambda layer. That will enable customers to add dd-trace-java to their lambdas as a java agent. Additionally, it also sets useful values inside the tracer to make sure the traces get back to Datadog.
Motivation
Testing Guidelines
All manual
Additional Notes
Types of changes
Checklist