Skip to main content

An implementation of trace span sender based on Hercules client. Also provides mapping from Hercules events back to spans.

Total Downloads
2.1M
2,065,383
Published
Jun 17, 2026
5mo ago

Get Started

dotnet add package Vostok.Tracing.Hercules --version 0.1.15
ProductVersions
.NET
net6.0net8.0
.NET Standard
netstandard2.0

README

Vostok.Tracing.Hercules

Build & Test & Publish NuGet

An implementation of trace span sender based on Hercules client. Also provides mapping from Hercules events back to spans.

Here's how ISpan instances are mapped into Hercules events (according to schema):

  • TraceId (mandatory) ---> traceId tag of UUID type.

  • SpanId (mandatory) ---> spanId tag of UUID type.

  • ParentSpanId (optional) ---> parentSpanId tag of UUID type.

  • BeginTimestamp (mandatory) corresponds to 2 tags:

    • beginTimestampUtc — a long tag that contains the UTC timestamp in 100-ns ticks from Unix epoch.
    • beginTimestampUtcOffset — a long tag with offset from UTC expressed in 100-ns ticks.
  • EndTimestamp (optional) also corresponds to 2 tags, both of which can be absent for 'endless' spans:

    • endTimestampUtc — a long tag that contains the UTC timestamp in 100-ns ticks from Unix epoch.
    • endTimestampUtcOffset — a long tag with offset from UTC expressed in 100-ns ticks.
  • Annotations dictionary corresponds to a container with name annotations. This container contains a tag for each pair. Keys are translated as-is, and the values are handled according to following conventions:

    • If the value is a primitive scalar or a vector of primitive scalars natively supported by Hercules (such as int, long, guid, string, etc), it's mapped as-is.
    • Otherwise the value gets converted to string: either stringified directly (if it properly overrides ToString()) or serialized to JSON. No further container-like structure is allowed, all values end up being 'flat'.

Hercules event's built-in timestamp is chosen equal to EndTimestampUtc or BeginTimestampUtc if former is missing.

Unix epoch used as a reference point for timestamp is 1970-01-01 00:00:00.000Z.

Downloads by Version

Similar & Alternative Packages

Hand-picked matching NuGet libraries based on tags & ecosystem

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.Compatibility metadata lists 3 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.