Model\Assistant\AIHelpers.cs (12)
47span_id = OtlpHelpers.ToShortenedId(s.SpanId),
48parent_span_id = s.ParentSpanId is { } id ? OtlpHelpers.ToShortenedId(id) : null,
50name = context.AddValue(s.Name, id => $@"Duplicate of ""name"" for span {OtlpHelpers.ToShortenedId(id)}", s.SpanId),
52status_message = context.AddValue(s.StatusMessage, id => $@"Duplicate of ""status_message"" for span {OtlpHelpers.ToShortenedId(id)}", s.SpanId),
57.ToDictionary(a => a.Key, a => context.AddValue(MapOtelAttributeValue(a), id => $@"Duplicate of attribute ""{id.Key}"" for span {OtlpHelpers.ToShortenedId(id.SpanId)}", (s.SpanId, a.Key))),
58links = s.Links.Select(l => new { trace_id = OtlpHelpers.ToShortenedId(l.TraceId), span_id = OtlpHelpers.ToShortenedId(l.SpanId) }).ToList(),
59back_links = s.BackLinks.Select(l => new { source_trace_id = OtlpHelpers.ToShortenedId(l.SourceTraceId), source_span_id = OtlpHelpers.ToShortenedId(l.SourceSpanId) }).ToList()
63trace_id = OtlpHelpers.ToShortenedId(trace.TraceId),
273span_id = OtlpHelpers.ToShortenedId(l.SpanId),
274trace_id = OtlpHelpers.ToShortenedId(l.TraceId),
Otlp\Model\OtlpSpan.cs (11)
187else if (!string.IsNullOrEmpty(OtlpHelpers.GetValue(span.Attributes, "db.system")))
189var dbSystem = OtlpHelpers.GetValue(span.Attributes, "db.system");
193else if (!string.IsNullOrEmpty(OtlpHelpers.GetValue(span.Attributes, "rpc.system")))
195var rpcSystem = OtlpHelpers.GetValue(span.Attributes, "rpc.system");
196var rpcService = OtlpHelpers.GetValue(span.Attributes, "rpc.service");
197var rpcMethod = OtlpHelpers.GetValue(span.Attributes, "rpc.method");
201var grpcStatusCode = OtlpHelpers.GetValue(span.Attributes, "rpc.grpc.status_code");
214else if (!string.IsNullOrEmpty(OtlpHelpers.GetValue(span.Attributes, "messaging.system")))
216var messagingSystem = OtlpHelpers.GetValue(span.Attributes, "messaging.system");
217var messagingOperation = OtlpHelpers.GetValue(span.Attributes, "messaging.operation");
218var destinationName = OtlpHelpers.GetValue(span.Attributes, "messaging.destination.name");
Otlp\Storage\TelemetryRepository.cs (9)
339if (!OtlpHelpers.TryGetOrAddScope(_logScopes, sl.Scope, _otlpContext, TelemetryType.Logs, out var scope))
429return OtlpHelpers.GetItems(results, context.StartIndex, context.Count, _logs.IsFull);
579var pagedResults = OtlpHelpers.GetItems(results, context.StartIndex, context.Count, _traces.IsFull, copyFunc);
831if (OtlpHelpers.MatchTelemetryId(traceId, trace.TraceId))
974if (!OtlpHelpers.TryGetOrAddScope(_traceScopes, scopeSpan.Scope, _otlpContext, TelemetryType.Traces, out var scope))
1145var hasPeerService = OtlpHelpers.GetPeerAddress(span.Attributes) != null;
1264StartTime = OtlpHelpers.UnixNanoSecondsToDateTime(span.StartTimeUnixNano),
1265EndTime = OtlpHelpers.UnixNanoSecondsToDateTime(span.EndTimeUnixNano),
1281Time = OtlpHelpers.UnixNanoSecondsToDateTime(e.TimeUnixNano),