Skip to content

fix: zipkin-exporter: don't export after shutdown#526

Merged
mayurkale22 merged 4 commits intoopen-telemetry:masterfrom
dynatrace-oss-contrib:fix_zipkin-export_shutdown
Nov 19, 2019
Merged

fix: zipkin-exporter: don't export after shutdown#526
mayurkale22 merged 4 commits intoopen-telemetry:masterfrom
dynatrace-oss-contrib:fix_zipkin-export_shutdown

Conversation

@Flarna
Copy link
Member

@Flarna Flarna commented Nov 13, 2019

Which problem is this PR solving?

According to spec and exporter should return FailedNotRetryable error
after shutdown was called.

see https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/sdk-tracing.md#shutdown-1

After the call to Shutdown subsequent calls to Export are not allowed and should return FailedNotRetryable error.

Short description of the changes

Remember that shutdown() was called and if yes immediate call callback with error.

@Flarna Flarna force-pushed the fix_zipkin-export_shutdown branch 2 times, most recently from 2f0ea0b to b9a35bd Compare November 13, 2019 08:03
@codecov-io
Copy link

codecov-io commented Nov 13, 2019

Codecov Report

Attention: Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.

Project coverage is 92.33%. Comparing base (b57951c) to head (6ae5d63).

Files with missing lines Patch % Lines
...ckages/opentelemetry-exporter-zipkin/src/zipkin.ts 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #526      +/-   ##
==========================================
- Coverage   92.40%   92.33%   -0.08%     
==========================================
  Files         146      146              
  Lines        7138     7080      -58     
  Branches      628      630       +2     
==========================================
- Hits         6596     6537      -59     
- Misses        542      543       +1     
Files with missing lines Coverage Δ
.../opentelemetry-exporter-zipkin/test/zipkin.test.ts 100.00% <100.00%> (ø)
...ckages/opentelemetry-exporter-zipkin/src/zipkin.ts 98.43% <85.71%> (-1.57%) ⬇️

... and 10 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Flarna Flarna force-pushed the fix_zipkin-export_shutdown branch from b9a35bd to 516d86a Compare November 13, 2019 08:10
According to spec and exporter should return FailedNotRetryable error
after shutdown was called.
@Flarna Flarna force-pushed the fix_zipkin-export_shutdown branch from 516d86a to cb5d416 Compare November 13, 2019 10:04
Copy link
Member

@mayurkale22 mayurkale22 left a comment

Choose a reason for hiding this comment

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

Looks like same thing needs to be implemented for Jaeger exporter.

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.

lgtm, one comment

@Flarna
Copy link
Member Author

Flarna commented Nov 15, 2019

Seems we have an issue with the just released node type definitions (DefinitelyTyped/DefinitelyTyped#40118):

src/http.ts:343:15 - error TS2345: Argument of type 'UrlWithStringQuery | null' is not assignable to parameter of type 'RequestOptions | (RequestOptions & Partial<UrlWithParsedQuery>) | null'.
  Type 'UrlWithStringQuery' is not assignable to type 'RequestOptions | (RequestOptions & Partial<UrlWithParsedQuery>) | null'.
    Type 'UrlWithStringQuery' is not assignable to type 'RequestOptions & Partial<UrlWithParsedQuery>'.
      Type 'UrlWithStringQuery' is not assignable to type 'RequestOptions'.
        Types of property 'protocol' are incompatible.
          Type 'string | null' is not assignable to type 'string | undefined'.
            Type 'null' is not assignable to type 'string | undefined'.

@OlivierAlbertini OlivierAlbertini added the bug Something isn't working label Nov 18, 2019
@mayurkale22 mayurkale22 merged commit 41fd196 into open-telemetry:master Nov 19, 2019
@Flarna Flarna deleted the fix_zipkin-export_shutdown branch November 19, 2019 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants