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

feat: add x-ray id generator #423

Merged
merged 13 commits into from
Apr 22, 2021
Merged

Conversation

anuraaga
Copy link
Contributor

Which problem is this PR solving?

  • Compatibility with X-Ray for OpenTelemetry JS

Short description of the changes

  • Adds an IdGenerator implementation that creates IDs compatible with X-Ray

@anuraaga anuraaga requested a review from a team April 15, 2021 06:35
@codecov
Copy link

codecov bot commented Apr 15, 2021

Codecov Report

Merging #423 (c804e10) into main (60dd7d1) will increase coverage by 0.28%.
The diff coverage is 98.59%.

@@            Coverage Diff             @@
##             main     #423      +/-   ##
==========================================
+ Coverage   95.83%   96.11%   +0.28%     
==========================================
  Files          15       21       +6     
  Lines         624      695      +71     
  Branches       94       95       +1     
==========================================
+ Hits          598      668      +70     
- Misses         26       27       +1     
Impacted Files Coverage Δ
...opentelemetry-id-generator-aws-xray/src/version.ts 0.00% <0.00%> (ø)
...erator-aws-xray/src/internal/xray-id-generation.ts 100.00% <100.00%> (ø)
...emetry-id-generator-aws-xray/src/platform/index.ts 100.00% <100.00%> (ø)
...r-aws-xray/src/platform/node/AWSXRayIdGenerator.ts 100.00% <100.00%> (ø)
...y-id-generator-aws-xray/src/platform/node/index.ts 100.00% <100.00%> (ø)
...generator-aws-xray/test/AWSXrayIdGenerator.test.ts 100.00% <100.00%> (ø)
... and 2 more

@anuraaga
Copy link
Contributor Author

Apologies for churn on browser tests - locally I get this weird error which I haven't been able to debug yet so scrambling in the dark a bit

Entrypoint index-webpack.2847160638 = runtime.js commons.js index-webpack.2847160638.js
15 04 2021 16:18:19.405:ERROR [karma-server]: Error during file loading or preprocessing
TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
    at new NodeError (node:internal/errors:329:5)
    at Hash.update (node:internal/crypto/hash:105:11)

@vmarchaud
Copy link
Member

Apologies for churn on browser tests - locally I get this weird error which I haven't been able to debug yet so scrambling in the dark a bit

Might be useful to try setting DEBUG=*, you'll get a lot of output but you might find some hints before the crash

Copy link
Contributor Author

@anuraaga anuraaga left a comment

Choose a reason for hiding this comment

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

Thanks @Flarna for the review!

Copy link
Member

@obecny obecny left a comment

Choose a reason for hiding this comment

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

I see you have some error on browsers tests, can you please check if it works fine on karma v.4 instead of 5 ?

packages/opentelemetry-id-generator-aws-xray/karma.conf.js Outdated Show resolved Hide resolved
"karma-coverage-istanbul-reporter": "3.0.3",
"karma-mocha": "2.0.1",
"karma-spec-reporter": "0.0.32",
"karma-webpack": "5.0.0",
Copy link
Member

Choose a reason for hiding this comment

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

Is this working for you as karma 5 doesn't work for me (osx), had to downgrade back to 4

@anuraaga
Copy link
Contributor Author

@obecny Thanks - with karma 4 I get less error output, just 19 04 2021 11:13:24.930:ERROR [karma-server]: UnhandledRejection. As the CI is ok with karma 5 and I couldn't find an improvement with 4 leaning towards leaving it as is for consistency with the other projects.

@dyladan dyladan added the enhancement New feature or request label Apr 19, 2021
@willarmiros
Copy link
Contributor

@dyladan would be awesome if this could be merged with its approvals :)

@vmarchaud vmarchaud merged commit 7233788 into open-telemetry:main Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants