Skip to content

Influence Sampled logic #968

Open
Open
@aurelijusbanelis

Description

@aurelijusbanelis

Current Distributed Tracing Sampling is based on "magic" (assuming "most common request is most important")

While the business is running on:

  • we have an anomaly, how to debug this particular page?
  • we do not care about 50% of information page traffic which are bots, we want to optimize checkout flow that is paying the bills

image

Therefore, we want to "teach" SDK what is important to sample.

Summary

Current Sampling logic is not configurable

Therefore developers have to end up with hacks.
It feels wrong paying for Observability platform and still need to have code like:

txn := newrelic.FromContext(ctx)
log := logrus.WithContext(newrelic.NewContext(ctx, txn))

if debugThisPage {
   log.WithField("url", u.String()).Debug("Outgoing call")
}

Desired Behaviour

txn := newrelic.FromContext(ctx)
txn.MarkKeyTransaction(true)

or

txn := newrelic.FromContext(ctx)
txn.PreferSampled(true)

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    PMProject Management Attentionenhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions