Benign go Download

github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.119.0

Go module checksum manifestGo module source archive layout

Evidence

Source SPDX license identifier declaration attributes.go · lines 1–48
1// Copyright The OpenTelemetry Authors
2// SPDX-License-Identifier: Apache-2.0
3
4package zipkin // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin/internal/zipkin"
5
6import (
7 "regexp"
8
9 "go.opentelemetry.io/collector/pdata/pcommon"
10)
11
⋯29 lines
41// DetermineValueType returns the native OTLP attribute type the string translates to.
42func DetermineValueType(value string) pcommon.ValueType {
43 for _, desc := range attrValDescriptions {
44 if desc.regex.MatchString(value) {
45 return desc.attrType
46 }
47 }
48 return pcommon.ValueTypeStr
imports encoding/hex json.go · lines 1–25
1// Copyright The OpenTelemetry Authors
2// SPDX-License-Identifier: Apache-2.0
3
4package zipkinv1 // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin/zipkinv1"
5
6import (
7 "encoding/hex"
8 "encoding/json"
9 "errors"
10 "fmt"
11 "math"
12 "strconv"
13 "time"
14
15 "github.com/jaegertracing/jaeger/thrift-gen/zipkincore"
16 "go.opentelemetry.io/collector/pdata/pcommon"
17 "go.opentelemetry.io/collector/pdata/ptrace"
18 conventions "go.opentelemetry.io/collector/semconv/v1.6.1"
19
20 "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin/internal/zipkin"
21)
22
23var (
24 // ZipkinV1 friendly conversion errors
25 msgZipkinV1JSONUnmarshalError = "zipkinv1"
Go JSON unmarshal call json.go · lines 90–96
90:55… ol) (ptrace.Traces, error) {
91 var zSpans []*jsonSpan
92 if err := json.Unmarshal(blob, &zSpans); err != nil {
93 return ptrace.Traces{}, fmt.Errorf("%s: %w", msgZipkinV1JSONUnmarshalError, err)
94 }
95
96 spanAndEnd …
References a loopback HTTP URL json_test.go · lines 579–587
579:30… p[string]any{
580 "http.status_code": 200,
581 "http.url": "http://localhost:9000/trace/2",
582 "success": true,
583 "processed": 1.5,
584 })
585
586 rm = td.ResourceSpans().AppendEmpty()
587 rm.Resource().Attributes().PutStr(conventions.Attribut …
JSON-like host or hostname field zipkin_v1_thrift_local_component.json · lines 1–39
⋯28 lines
29 "annotation_type": "STRING",
30 "value": "bXlMb2NhbENvbXBvbmVudA==",
31 "host": {
32 "ipv4": -1407254521,
33 "port": 0,
⋯6 lines

Showing the top 5 files — 3 more files (30 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.