public record class TelemetryOptionsWhere a server's metrics go, and what they say they came from.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Every field has a sensible default and most deployments set none of them. The OpenTelemetry SDK reads OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_SERVICE_NAME and the rest of the standard environment on its own, and a container orchestrator already sets those — so a server that calls Start with a bare instance is configured by its deployment rather than by its build, which is the way round that lets one image run in three environments.
What is here is for the cases the environment cannot express: a name a game gives itself, an instance id that is the match rather than the pod, and the console fallback.
Fields and properties (8)
public string ServiceNameWhat this process calls itself. Overridden by OTEL_SERVICE_NAME.
public string? ServiceVersionWhich build it is, so a rollout can tell two of them apart.
public string? ServiceInstanceIdWhich one of the fleet this is. A hostname is the usual answer; a match id is the more useful one, when a process is one match.
public Uri? EndpointWhere the collector is. Null takes OTEL_EXPORTER_OTLP_ENDPOINT, and then the SDK's own default of http://localhost:4317 — which is the sidecar.
public TimeSpan ExportIntervalHow often metrics are pushed.
public bool IncludeRuntimeMetricsWhether to publish CPU, GC, thread-pool and exception counts alongside.
public bool AlsoWriteToConsoleWhether to also print every export to standard output.
public IReadOnlyDictionary<string, object>? AttributesExtra resource attributes: region, cluster, game mode, whatever the fleet is cut by.
Used by (2)
- NetworkTelemetryVixen.Net.Telemetry
- NetworkTelemetryTestsVixen.Net.Telemetry.Tests