question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add suport to flush via API

See original GitHub issue

The AWS Lambda Plugin as the requirement to flush data at the time the invocation of the function is done. See https://github.com/open-telemetry/opentelemetry-js-contrib/blob/b128dae70cf5723162ef72ed0ed83924f3edf4dc/plugins/node/opentelemetry-instrumentation-aws-lambda/src/aws-lambda.ts#L199-L206

As once can see this creates a binding from instrumentation to a specific SDK. Usually an instrumentation should have no need to require SDK components.

Currently API offers no way to get the TracerProvider used (it returns a ProxyTracerProvider) nor does it offer a way to force flush the trace data.

Should we enhance the API with some functionality regarding this?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
yurishkurocommented, Apr 20, 2021

I am not clear how this is not addressed by the ForceFlush that is already in the spec? https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#forceflush

0reactions
secustorcommented, Jun 12, 2022

Is there any movement on this topic? I have ran into this too as I’m loosing spans if using the batchprocessor.

The stop-gap solution for me has been this snippet, but it is far from ideal:

  const traceProvider = api.trace.getTracerProvider();
  if (traceProvider instanceof NodeTracerProvider) {
    await traceProvider.shutdown();
  } else if (traceProvider instanceof ProxyTracerProvider) {
    const delegateProvider = traceProvider.getDelegate()
    if (delegateProvider instanceof NodeTracerProvider) {
      await delegateProvider.shutdown()
    }
  }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Add suport to flush via API · Issue #3310 · open-telemetry ...
The AWS Lambda Plugin as the requirement to flush data at the time the invocation of the function is done.
Read more >
Flush API | Elasticsearch Guide [8.5] | Elastic
Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction...
Read more >
Refresh apis when flush - WordPress.org
If you go to Settings > WP REST Cache and check the “Enable cache regeneration” checkbox a cron job will be added to...
Read more >
API flush commands - no URL - Jamf Nation Community
When I run it, I get "curl: no URL specified!" ... This runs without any errors, but nothing is reflected on the JSS....
Read more >
Flush cache with Yottaa API
Note: In order to flush cache via API you will need to provide a full URI. Currently we do not support flushing based...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found