Giter Club home page Giter Club logo

boomerang-opentelemetry-plugin's People

Contributors

aaronweissler avatar dependabot[bot] avatar eddeccc avatar ivansenic avatar jonaskunz avatar mariusbrill avatar mariusoe avatar mc-chaos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

boomerang-opentelemetry-plugin's Issues

Add ability to use multi-header injection of B3 tracing headers

Currently, the B3 context propagation uses single header injection to inject the tracing header into the XHR requests. It should be possible to use multi header injection, to be able to use the propergation in case the following system cannot handle single B3 headers.

Missing License

Hi,
Can you add license to your repo so we will be able to use it (fork, redistribute ... ) ?

Thanks

include "OpenTelemetry Plugin Document Load"

Send a trace parent from your server

This plugin supports connecting the server side spans for the initial HTML load with the client side span for the load from the browser's timing API. This works by having the server send its parent trace context (trace ID, span ID and trace sampling decision) to the client.

Because the browser does not send a trace context header for the initial page navigation, the server needs to fake a trace context header in a middleware and then send that trace context header back to the client as a meta tag traceparent . The traceparent meta tag should be in the trace context W3C draft format . For example:

https://github.com/open-telemetry/opentelemetry-js-contrib/blob/master/plugins/web/opentelemetry-plugin-document-load/README.md

  ...
<head>
  <!--
    https://www.w3.org/TR/trace-context/
    Set the `traceparent` in the server's HTML template code. It should be
    dynamically generated server side to have the server's request trace Id,
    a parent span Id that was set on the server's request span, and the trace
    flags to indicate the server's sampling decision
    (01 = sampled, 00 = notsampled).
    '{version}-{traceId}-{spanId}-{sampleDecision}'
  -->
  <meta name="traceparent" content="00-ab42124a3c573678d4d8b21ba52df3bf-d21f7bc17caa5aba-01">
</head>
<body>
  ...
  <script>
    // and then initialise the WebTracer
    // var webTracer = new WebTracer({ .......
  </script>
</body>

Propagation not working with xhr and fetch

I'm using Boomerang otel plugin in my front-end and boomerang otel in my backend. Each network call is getting traced and visible in jaeger-ui but propagation is not happening. Service name is same in both sides.
Below is my Boomerang OTEL plugin configuration.
BOOMR.init({
beacon_url: 'http://localhost:8997/beacon',
ResourceTiming: {
enabled: true,
clearOnBeacon: true
},
AutoXHR: {
alwaysSendXhr: true
},
instrument_xhr: true,
History: {
enabled: true
},
OpenTelemetry: {
samplingRate: 1.0,
corsUrls: '',
collectorConfiguration: {
url: 'http://localhost:4318/v1/traces',
method:'POST',
headers: {},
concurrencyLimit: 10,
},
plugins_config: {
instrument_fetch: {
enabled: true,
clearTimingResources: false,
path: "",
applyCustomAttributesOnSpan: null, //A method with the following structure: (span: Span, request: Request) => { },
ignoreUrls: [],
propagateTraceHeaderCorsUrls: ['
']
},
instrument_xhr: {
enabled: true,
path: "",
applyCustomAttributesOnSpan: null, //A method with the following structure: (span: Span, xhr: XMLHttpRequest) => { },
propagateTraceHeaderCorsUrls: ['*'],
ignoreUrls: [],
clearTimingResources: false,
},
instrument_document_load: {
enabled: true,
path: "",
},
instrument_user_interaction: {
enabled: true,
path: "",
}
},
commonAttributes: {
"application": "UI",
"stage": "dev"
},
serviceName: "UI_BO_TEST",
propagationHeader: "TRACE_CONTEXT"
},
});
});

Use batch span processor for exporting spans

Instead of exporting each span separately, multiple spans can be combined and exported in a single batch using the BatchSpanProcessor.

const provider = new WebTracerProvider();
const exporter = new CollectorTraceExporter(collectorOptions);
provider.addSpanProcessor(new BatchSpanProcessor(exporter, {
  // The maximum queue size. After the size is reached spans are dropped.
  maxQueueSize: 100,
  // The maximum batch size of every export. It must be smaller or equal to maxQueueSize.
  maxExportBatchSize: 10,
  // The interval between two consecutive exports
  scheduledDelayMillis: 500,
  // How long the export can run before it is cancelled
  exportTimeoutMillis: 30000,
}));

The Plugin does not work in IE11 when Prototypejs is used

When using the IE11 browser and Prototypejs, the plugin does not work. This is caused by the OpenTelemetry framework due to a polyfill of core-js which is used in OpenTelemetry and the fact, that Prototypejs adds a entries attribute to the array class.

In that case, core-js fails to load its define-iterator module.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.