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

chore: adding async function for safe execute in instrumentation #1803

Merged
merged 4 commits into from
Jan 13, 2021

Conversation

obecny
Copy link
Member

@obecny obecny commented Jan 8, 2021

Short description of the changes

  • Adding async function safeExecuteInTheMiddleAsync for instrumentations

@codecov
Copy link

codecov bot commented Jan 8, 2021

Codecov Report

Merging #1803 (a4ec0d1) into master (1035ac4) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1803      +/-   ##
==========================================
- Coverage   92.48%   92.45%   -0.03%     
==========================================
  Files         173      173              
  Lines        6012     6028      +16     
  Branches     1287     1288       +1     
==========================================
+ Hits         5560     5573      +13     
- Misses        452      455       +3     
Impacted Files Coverage Δ
...ackages/opentelemetry-instrumentation/src/utils.ts 100.00% <100.00%> (ø)
...emetry-core/src/platform/node/RandomIdGenerator.ts 87.50% <0.00%> (-6.25%) ⬇️
...etry-exporter-prometheus/src/PrometheusExporter.ts 90.76% <0.00%> (-1.54%) ⬇️
...ges/opentelemetry-instrumentation-http/src/http.ts 94.67% <0.00%> (-0.82%) ⬇️
...ackages/opentelemetry-api/src/trace/ProxyTracer.ts 93.75% <0.00%> (ø)
...-instrumentation-fetch/src/enums/AttributeNames.ts
...s/opentelemetry-instrumentation-fetch/src/fetch.ts
packages/opentelemetry-plugin-fetch/src/fetch.ts 96.55% <0.00%> (ø)
...telemetry-plugin-fetch/src/enums/AttributeNames.ts 100.00% <0.00%> (ø)
...trumentation/src/platform/node/old/PluginLoader.ts 93.97% <0.00%> (+0.07%) ⬆️
... and 1 more

@dyladan
Copy link
Member

dyladan commented Jan 11, 2021

Can you provide an example when this would be used? Implementation seems fine to me but I'm not sure I understand the usecase.

@obecny
Copy link
Member Author

obecny commented Jan 11, 2021

Can you provide an example when this would be used? Implementation seems fine to me but I'm not sure I understand the usecase.

https://github.com/open-telemetry/opentelemetry-js-contrib/blob/master/plugins/node/opentelemetry-instrumentation-graphql/src/utils.ts#L360

@dyladan dyladan merged commit 139d9db into open-telemetry:master Jan 13, 2021
@obecny obecny deleted the safe_async branch February 2, 2021 17:25
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.

4 participants