Skip to content

Commit 26bda7a

Browse files
author
tracing-team-rebase-bot
committed
merge upstream/main into main
2 parents 040a9f9 + dac4774 commit 26bda7a

File tree

47 files changed

+1549
-155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1549
-155
lines changed

.chloggen/kind130.yaml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.chloggen/set-gomemlimit.yaml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.chloggen/usage_metrics.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
2+
change_type: enhancement
3+
4+
# The name of the component, or a single word describing the area of concern, (e.g. collector, target allocator, auto-instrumentation, opamp, github action)
5+
component: collector
6+
7+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
8+
note: Add usage metrics for the collector
9+
10+
# One or more tracking issues related to the change
11+
issues: [2829]
12+
13+
# (Optional) One or more lines of additional information to render under the primary note.
14+
# These lines will be padded with 2 spaces and then inserted directly into the document.
15+
# Use pipe (|) for multiline entries.
16+
subtext: |
17+
This change will add metrics to the OpenTelemetry operator about how the collector is used in the cluster,
18+
it will add the following metrics to the opentelemetry-operator metrics endpoint
19+
```
20+
opentelemetry_collector_receivers{collector_name="collector_name", namespace="ns", type="otlp"} 1
21+
opentelemetry_collector_exporters{collector_name="collector_name", namespace="ns", type="otlp"} 1
22+
opentelemetry_collector_processors{collector_name="collector_name", namespace="ns", type="otlp"} 1
23+
opentelemetry_collector_connectors{collector_name="collector_name", namespace="ns", type="myconnector"} 0
24+
opentelemetry_collector_info{collector_name="simplest",namespace="default", type="deployment"} 1
25+
```

CHANGELOG.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,30 @@
22

33
<!-- next version -->
44

5+
## 0.101.0
6+
7+
### 💡 Enhancements 💡
8+
9+
- `operator`: Support for Kubernetes 1.30 version. (#2881)
10+
- `collector`: Keep multiple previous versions of the Collector ConfigMap, configurable via the ConfigVersions field. (#2871)
11+
This change introduces a new field in the Collector ConfigMap, `ConfigVersions`, which allows users to specify the number of previous versions of the Collector ConfigMap to keep. The default value is 1, which means that the current and one previous version of the Collector ConfigMap are kept. By keeping historical versions of the configuration, we ensure that during a config upgrade the previous configuration is still available for running (non-upgraded) pods as well as for rollbacks. If we overwrite the original ConfigMap with the new configuration, any pod which restarts for any reason will get the new configuration, which makes rollouts impossible to control.
12+
- `collector, target allocator, opamp`: Introduces a new feature gate for `operator.golang.flags` to automatically add the environment variables for GOMAXPROCS and GOMEMLIMIT (#2919, #1456)
13+
A new featuregate `operator.golang.flags` is added. This featuregate will allow the operator to automatically
14+
set GOMAXPROCS and GOMEMLIMIT equal to the CPU and Memory limit provided respectively for the pod.
15+
16+
17+
### Components
18+
19+
* [OpenTelemetry Collector - v0.101.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.101.0)
20+
* [OpenTelemetry Contrib - v0.101.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.101.0)
21+
* [Java auto-instrumentation - v1.32.1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.32.1)
22+
* [.NET auto-instrumentation - v1.2.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.2.0)
23+
* [Node.JS - v0.51.0](https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.51.0)
24+
* [Python - v0.44b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.44b0)
25+
* [Go - v0.12.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.12.0-alpha)
26+
* [ApacheHTTPD - 1.0.4](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.4)
27+
* [Nginx - 1.0.4](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.4)
28+
529
## 0.100.1
630

731
### 💡 Enhancements 💡
@@ -18,7 +42,7 @@
1842
* [OpenTelemetry Collector - v0.100.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.100.0)
1943
* [OpenTelemetry Contrib - v0.100.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.100.0)
2044
* [Java auto-instrumentation - v1.32.1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.32.1)
21-
* [.NET auto-instrumentation - v1.2.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/{AUTO_INSTRUMENTATION_DOTNET_VERSION})
45+
* [.NET auto-instrumentation - v1.2.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.2.0)
2246
* [Node.JS - v0.51.0](https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.51.0)
2347
* [Python - v0.44b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.44b0)
2448
* [Go - v0.12.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.12.0-alpha)
@@ -64,7 +88,7 @@
6488
* [OpenTelemetry Collector - v0.100.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.100.0)
6589
* [OpenTelemetry Contrib - v0.100.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.100.0)
6690
* [Java auto-instrumentation - v1.32.1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.32.1)
67-
* [.NET auto-instrumentation - v1.2.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/{AUTO_INSTRUMENTATION_DOTNET_VERSION})
91+
* [.NET auto-instrumentation - v1.2.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.2.0)
6892
* [Node.JS - v0.51.0](https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.51.0)
6993
* [Python - v0.44b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.44b0)
7094
* [Go - v0.12.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.12.0-alpha)
@@ -153,7 +177,7 @@
153177
* [OpenTelemetry Collector - v0.98.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.98.0)
154178
* [OpenTelemetry Contrib - v0.98.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.98.0)
155179
* [Java auto-instrumentation - v1.32.1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.32.1)
156-
* [.NET auto-instrumentation - v1.2.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/{AUTO_INSTRUMENTATION_DOTNET_VERSION})
180+
* [.NET auto-instrumentation - v1.2.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.2.0)
157181
* [Node.JS - v0.49.1](https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.49.1)
158182
* [Python - v0.44b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.44b0)
159183
* [Go - v0.10.1-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.10.1-alpha)
@@ -171,7 +195,7 @@
171195
* [OpenTelemetry Collector - v0.97.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.97.0)
172196
* [OpenTelemetry Contrib - v0.97.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.97.0)
173197
* [Java auto-instrumentation - v1.32.1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.32.1)
174-
* [.NET auto-instrumentation - v1.2.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/{AUTO_INSTRUMENTATION_DOTNET_VERSION})
198+
* [.NET auto-instrumentation - v1.2.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.2.0)
175199
* [Node.JS - v0.49.1](https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.49.1)
176200
* [Python - v0.44b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.44b0)
177201
* [Go - v0.10.1-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.10.1-alpha)

OWNERS

Lines changed: 0 additions & 15 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,8 @@ We use `cert-manager` for some features of this operator and the third column sh
729729
The OpenTelemetry Operator _might_ work on versions outside of the given range, but when opening new issues, please make sure to test your scenario on a supported version.
730730

731731
| OpenTelemetry Operator | Kubernetes | Cert-Manager |
732-
|------------------------| -------------- | ------------ |
732+
|------------------------|----------------| ------------ |
733+
| v0.101.0 | v1.23 to v1.30 | v1 |
733734
| v0.100.0 | v1.23 to v1.29 | v1 |
734735
| v0.99.0 | v1.23 to v1.29 | v1 |
735736
| v0.98.0 | v1.23 to v1.29 | v1 |
@@ -752,7 +753,6 @@ The OpenTelemetry Operator _might_ work on versions outside of the given range,
752753
| v0.81.0 | v1.19 to v1.27 | v1 |
753754
| v0.80.0 | v1.19 to v1.27 | v1 |
754755
| v0.79.0 | v1.19 to v1.27 | v1 |
755-
| v0.78.0 | v1.19 to v1.27 | v1 |
756756

757757
## Contributing and Developing
758758

RELEASE.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ The operator should be released within a week after the [OpenTelemetry collector
4444

4545
| Version | Release manager |
4646
|----------|-----------------|
47-
| v0.101.0 | @swiatekm-sumo |
48-
| v0.102.0 | @frzifus |
49-
| v0.103.0 | @jaronoff97 |
50-
| v0.104.0 | @pavolloffay |
51-
| v0.105.0 | @yuriolisa |
52-
| v0.106.0 | @TylerHelmuth |
47+
| v0.102.0 | @swiatekm-sumo |
48+
| v0.103.0 | @frzifus |
49+
| v0.104.0 | @jaronoff97 |
50+
| v0.105.0 | @pavolloffay |
51+
| v0.106.0 | @yuriolisa |
52+
| v0.107.0 | @TylerHelmuth |

apis/v1beta1/collector_webhook.go

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ type CollectorWebhook struct {
7676
cfg config.Config
7777
scheme *runtime.Scheme
7878
reviewer *rbac.Reviewer
79+
metrics *Metrics
7980
}
8081

8182
func (c CollectorWebhook) Default(_ context.Context, obj runtime.Object) error {
@@ -166,23 +167,57 @@ func (c CollectorWebhook) ValidateCreate(ctx context.Context, obj runtime.Object
166167
if !ok {
167168
return nil, fmt.Errorf("expected an OpenTelemetryCollector, received %T", obj)
168169
}
169-
return c.validate(ctx, otelcol)
170+
171+
warnings, err := c.validate(ctx, otelcol)
172+
if err != nil {
173+
return warnings, err
174+
}
175+
if c.metrics != nil {
176+
c.metrics.create(ctx, otelcol)
177+
}
178+
179+
return warnings, nil
170180
}
171181

172-
func (c CollectorWebhook) ValidateUpdate(ctx context.Context, _, newObj runtime.Object) (admission.Warnings, error) {
182+
func (c CollectorWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
173183
otelcol, ok := newObj.(*OpenTelemetryCollector)
174184
if !ok {
175185
return nil, fmt.Errorf("expected an OpenTelemetryCollector, received %T", newObj)
176186
}
177-
return c.validate(ctx, otelcol)
187+
188+
otelcolOld, ok := oldObj.(*OpenTelemetryCollector)
189+
if !ok {
190+
return nil, fmt.Errorf("expected an OpenTelemetryCollector, received %T", oldObj)
191+
}
192+
193+
warnings, err := c.validate(ctx, otelcol)
194+
if err != nil {
195+
return warnings, err
196+
}
197+
198+
if c.metrics != nil {
199+
c.metrics.update(ctx, otelcolOld, otelcol)
200+
}
201+
202+
return warnings, nil
178203
}
179204

180205
func (c CollectorWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error) {
181206
otelcol, ok := obj.(*OpenTelemetryCollector)
182207
if !ok || otelcol == nil {
183208
return nil, fmt.Errorf("expected an OpenTelemetryCollector, received %T", obj)
184209
}
185-
return c.validate(ctx, otelcol)
210+
211+
warnings, err := c.validate(ctx, otelcol)
212+
if err != nil {
213+
return warnings, err
214+
}
215+
216+
if c.metrics != nil {
217+
c.metrics.delete(ctx, otelcol)
218+
}
219+
220+
return warnings, nil
186221
}
187222

188223
func (c CollectorWebhook) validate(ctx context.Context, r *OpenTelemetryCollector) (admission.Warnings, error) {
@@ -419,12 +454,13 @@ func checkAutoscalerSpec(autoscaler *AutoscalerSpec) error {
419454
return nil
420455
}
421456

422-
func SetupCollectorWebhook(mgr ctrl.Manager, cfg config.Config, reviewer *rbac.Reviewer) error {
457+
func SetupCollectorWebhook(mgr ctrl.Manager, cfg config.Config, reviewer *rbac.Reviewer, metrics *Metrics) error {
423458
cvw := &CollectorWebhook{
424459
reviewer: reviewer,
425460
logger: mgr.GetLogger().WithValues("handler", "CollectorWebhook", "version", "v1beta1"),
426461
scheme: mgr.GetScheme(),
427462
cfg: cfg,
463+
metrics: metrics,
428464
}
429465
return ctrl.NewWebhookManagedBy(mgr).
430466
For(&OpenTelemetryCollector{}).

0 commit comments

Comments
 (0)