Skip to content

Commit a26d7a4

Browse files
authored
Merge branch 'main' into main
2 parents a6c4a54 + 837861f commit a26d7a4

File tree

17 files changed

+81
-25
lines changed

17 files changed

+81
-25
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: telemetrygen
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Support `--service` for all signal types, rather than just traces
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [38044]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: []
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: breaking
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: telemetrygen
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Update attribute of generated traces from `net.peer.ip` to `net.sock.peer.addr` to bring it in line with new semconv.
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [38043]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: []

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ exporter/bmchelixexporter/ @open-telemetry
5353
exporter/carbonexporter/ @open-telemetry/collector-contrib-approvers @aboguszewski-sumo
5454
exporter/cassandraexporter/ @open-telemetry/collector-contrib-approvers @atoulme @emreyalvac
5555
exporter/clickhouseexporter/ @open-telemetry/collector-contrib-approvers @hanjm @dmitryax @Frapschen @SpencerTorres
56-
exporter/coralogixexporter/ @open-telemetry/collector-contrib-approvers @povilasv @iblancasa
56+
exporter/coralogixexporter/ @open-telemetry/collector-contrib-approvers @povilasv @iblancasa @douglascamata
5757
exporter/datadogexporter/ @open-telemetry/collector-contrib-approvers @mx-psi @dineshg13 @liustanley @songy23 @mackjmr @ankitpatel96 @jade-guiton-dd @IbraheemA
5858
exporter/datasetexporter/ @open-telemetry/collector-contrib-approvers @atoulme @martin-majlis-s1 @zdaratom-s1 @tomaz-s1
5959
exporter/dorisexporter/ @open-telemetry/collector-contrib-approvers @atoulme @joker-star-l

cmd/telemetrygen/internal/common/config.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111

1212
"github.com/spf13/pflag"
1313
"go.opentelemetry.io/otel/attribute"
14+
semconv "go.opentelemetry.io/otel/semconv/v1.25.0"
1415
)
1516

1617
var (
@@ -72,6 +73,7 @@ type Config struct {
7273
HTTPPath string
7374
Headers KeyValue
7475
ResourceAttributes KeyValue
76+
ServiceName string
7577
TelemetryAttributes KeyValue
7678

7779
// OTLP TLS configuration
@@ -102,6 +104,8 @@ func (c *Config) Endpoint() string {
102104
func (c *Config) GetAttributes() []attribute.KeyValue {
103105
var attributes []attribute.KeyValue
104106

107+
// may be overridden by `--otlp-attributes service.name="foo"`
108+
attributes = append(attributes, semconv.ServiceNameKey.String(c.ServiceName))
105109
if len(c.ResourceAttributes) > 0 {
106110
for k, t := range c.ResourceAttributes {
107111
switch v := t.(type) {
@@ -158,6 +162,8 @@ func (c *Config) CommonFlags(fs *pflag.FlagSet) {
158162
fs.BoolVar(&c.InsecureSkipVerify, "otlp-insecure-skip-verify", c.InsecureSkipVerify, "Whether a client verifies the server's certificate chain and host name")
159163
fs.BoolVar(&c.UseHTTP, "otlp-http", c.UseHTTP, "Whether to use HTTP exporter rather than a gRPC one")
160164

165+
fs.StringVar(&c.ServiceName, "service", c.ServiceName, "Service name to use")
166+
161167
// custom headers
162168
fs.Var(&c.Headers, "otlp-header", "Custom header to be passed along with each OTLP request. The value is expected in the format key=\"value\". "+
163169
"Note you may need to escape the quotes when using the tool from a cli. "+
@@ -198,6 +204,7 @@ func (c *Config) SetDefaults() {
198204
c.HTTPPath = ""
199205
c.Headers = make(KeyValue)
200206
c.ResourceAttributes = make(KeyValue)
207+
c.ServiceName = "telemetrygen"
201208
c.TelemetryAttributes = make(KeyValue)
202209
c.CaFile = ""
203210
c.ClientAuth.Enabled = false

cmd/telemetrygen/pkg/logs/logs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"go.opentelemetry.io/otel/log"
1717
sdklog "go.opentelemetry.io/otel/sdk/log"
1818
"go.opentelemetry.io/otel/sdk/resource"
19-
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
19+
semconv "go.opentelemetry.io/otel/semconv/v1.25.0"
2020
"go.uber.org/zap"
2121
"golang.org/x/time/rate"
2222

cmd/telemetrygen/pkg/traces/config.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ type Config struct {
1818
NumTraces int
1919
NumChildSpans int
2020
PropagateContext bool
21-
ServiceName string
2221
StatusCode string
2322
Batch bool
2423
LoadSize int
@@ -41,7 +40,6 @@ func (c *Config) Flags(fs *pflag.FlagSet) {
4140
fs.IntVar(&c.NumTraces, "traces", c.NumTraces, "Number of traces to generate in each worker (ignored if duration is provided)")
4241
fs.IntVar(&c.NumChildSpans, "child-spans", c.NumChildSpans, "Number of child spans to generate for each trace")
4342
fs.BoolVar(&c.PropagateContext, "marshal", c.PropagateContext, "Whether to marshal trace context via HTTP headers")
44-
fs.StringVar(&c.ServiceName, "service", c.ServiceName, "Service name to use")
4543
fs.StringVar(&c.StatusCode, "status-code", c.StatusCode, "Status code to use for the spans, one of (Unset, Error, Ok) or the equivalent integer (0,1,2)")
4644
fs.BoolVar(&c.Batch, "batch", c.Batch, "Whether to batch traces")
4745
fs.IntVar(&c.LoadSize, "size", c.LoadSize, "Desired minimum size in MB of string data for each trace generated. This can be used to test traces with large payloads, i.e. when testing the OTLP receiver endpoint max receive size.")
@@ -57,7 +55,6 @@ func (c *Config) SetDefaults() {
5755
c.NumTraces = 1
5856
c.NumChildSpans = 1
5957
c.PropagateContext = false
60-
c.ServiceName = "telemetrygen"
6158
c.StatusCode = "0"
6259
c.Batch = true
6360
c.LoadSize = 0

cmd/telemetrygen/pkg/traces/traces.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
2121
"go.opentelemetry.io/otel/sdk/resource"
2222
sdktrace "go.opentelemetry.io/otel/sdk/trace"
23-
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
23+
semconv "go.opentelemetry.io/otel/semconv/v1.25.0"
2424
"go.uber.org/zap"
2525
"golang.org/x/time/rate"
2626

@@ -80,8 +80,6 @@ func Start(cfg *Config) error {
8080
}
8181

8282
var attributes []attribute.KeyValue
83-
// may be overridden by `--otlp-attributes service.name="foo"`
84-
attributes = append(attributes, semconv.ServiceNameKey.String(cfg.ServiceName))
8583
attributes = append(attributes, cfg.GetAttributes()...)
8684

8785
tracerProvider := sdktrace.NewTracerProvider(

cmd/telemetrygen/pkg/traces/worker.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"go.opentelemetry.io/otel/attribute"
1616
"go.opentelemetry.io/otel/codes"
1717
"go.opentelemetry.io/otel/propagation"
18-
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
18+
semconv "go.opentelemetry.io/otel/semconv/v1.25.0"
1919
"go.opentelemetry.io/otel/trace"
2020
"go.uber.org/zap"
2121
"golang.org/x/time/rate"
@@ -55,8 +55,8 @@ func (w worker) simulateTraces(telemetryAttributes []attribute.KeyValue) {
5555
}
5656

5757
ctx, sp := tracer.Start(context.Background(), "lets-go", trace.WithAttributes(
58-
semconv.NetPeerIPKey.String(fakeIP),
59-
semconv.PeerServiceKey.String("telemetrygen-server"),
58+
semconv.NetSockPeerAddr(fakeIP),
59+
semconv.PeerService("telemetrygen-server"),
6060
),
6161
trace.WithSpanKind(trace.SpanKindClient),
6262
trace.WithTimestamp(spanStart),
@@ -83,8 +83,8 @@ func (w worker) simulateTraces(telemetryAttributes []attribute.KeyValue) {
8383
}
8484

8585
_, child := tracer.Start(childCtx, "okey-dokey-"+strconv.Itoa(j), trace.WithAttributes(
86-
semconv.NetPeerIPKey.String(fakeIP),
87-
semconv.PeerServiceKey.String("telemetrygen-client"),
86+
semconv.NetSockPeerAddr(fakeIP),
87+
semconv.PeerService("telemetrygen-client"),
8888
),
8989
trace.WithSpanKind(trace.SpanKindServer),
9090
trace.WithTimestamp(spanStart),

examples/demo/client/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
sdkmetric "go.opentelemetry.io/otel/sdk/metric"
2727
"go.opentelemetry.io/otel/sdk/resource"
2828
sdktrace "go.opentelemetry.io/otel/sdk/trace"
29-
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
29+
semconv "go.opentelemetry.io/otel/semconv/v1.25.0"
3030
)
3131

3232
// Initializes an OTLP exporter, and configures the corresponding trace and

examples/demo/server/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
sdkmetric "go.opentelemetry.io/otel/sdk/metric"
2626
"go.opentelemetry.io/otel/sdk/resource"
2727
sdktrace "go.opentelemetry.io/otel/sdk/trace"
28-
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
28+
semconv "go.opentelemetry.io/otel/semconv/v1.25.0"
2929
"go.opentelemetry.io/otel/trace"
3030
)
3131

examples/secure-tracing/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ secure-tracing-otel-collector-1 | Name : okey-dokey
106106
secure-tracing-otel-collector-1 | Kind : Server
107107
...
108108
secure-tracing-otel-collector-1 | Attributes:
109-
secure-tracing-otel-collector-1 | -> net.peer.ip: Str(1.2.3.4)
109+
secure-tracing-otel-collector-1 | -> net.sock.peer.addr: Str(1.2.3.4)
110110
secure-tracing-otel-collector-1 | -> peer.service: Str(telemetrygen-client)
111111
...
112112

exporter/coralogixexporter/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
| Stability | [beta]: traces, metrics, logs |
77
| Distributions | [contrib] |
88
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fcoralogix%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fcoralogix) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fcoralogix%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fcoralogix) |
9-
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@povilasv](https://www.github.com/povilasv), [@iblancasa](https://www.github.com/iblancasa) |
9+
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@povilasv](https://www.github.com/povilasv), [@iblancasa](https://www.github.com/iblancasa), [@douglascamata](https://www.github.com/douglascamata) |
1010

1111
[beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta
1212
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib

exporter/coralogixexporter/metadata.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ status:
66
beta: [traces, metrics, logs]
77
distributions: [contrib]
88
codeowners:
9-
active: [povilasv, iblancasa]
9+
active: [povilasv, iblancasa, douglascamata]
1010

1111
tests:
1212
config:
1313
domain: "coralogix.com"
1414
private_key: "xxx"
15-
expect_consumer_error: true
15+
expect_consumer_error: true

exporter/elasticsearchexporter/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.23.0
44

55
require (
66
github.com/cenkalti/backoff/v4 v4.3.0
7-
github.com/elastic/go-docappender/v2 v2.5.0
7+
github.com/elastic/go-docappender/v2 v2.6.0
88
github.com/elastic/go-elasticsearch/v8 v8.17.1
99
github.com/elastic/go-structform v0.0.12
1010
github.com/klauspost/compress v1.17.11

exporter/elasticsearchexporter/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

exporter/elasticsearchexporter/integrationtest/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasti
33
go 1.23.0
44

55
require (
6-
github.com/elastic/go-docappender/v2 v2.5.0
6+
github.com/elastic/go-docappender/v2 v2.6.0
77
github.com/gorilla/mux v1.8.1
88
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter v0.120.0
99
github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.120.0

exporter/elasticsearchexporter/integrationtest/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)