census-instrumentation / opencensus-web

A stats collection and distributed tracing framework

Home Page:https://opencensus.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Provide option to set a sampling rate if no sampling decision given from server

draffensperger opened this issue · comments

Currently if there is no traceparent global variable set by a <script> tag sent by the server, then the library will trace every request.

In order to make this server-side configuration optional, the library should support a lightweight way to set a sampling rate by setting an ocSampleRate global variable that would configure the sampling rate in the absence of a traceparent header.