Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker image in examples/demo from 0.88.0 to 0.116.0 #37031

Closed
apolzek opened this issue Jan 6, 2025 · 4 comments · Fixed by #37063
Closed

Update docker image in examples/demo from 0.88.0 to 0.116.0 #37031

apolzek opened this issue Jan 6, 2025 · 4 comments · Fixed by #37063

Comments

@apolzek
Copy link
Contributor

apolzek commented Jan 6, 2025

Describe the issue you're reporting

Update docker image and configuration for example from otel/opentelemetry-collector:0.88.0 to otel/opentelemetry-collector:0.116.0

Component(s)

examples/demo

Description:

I would like to update the docker image used in the example from otel/opentelemetry-collector:0.88.0 to otel/opentelemetry-collector:0.116.0. This update requires some changes to the collector configuration (otel-collector-config.yaml) due to a breaking change in the collector. In version 0.116.0, the collector no longer exposes configurations on 0.0.0.0 by default.

To ensure that the example works with the current setup using Docker Compose, I will need to add the following configuration:

service:

  telemetry:
    metrics:
      readers:
        - pull:
            exporter:
              prometheus:
                host: '0.0.0.0'
                port: 8888

These changes are necessary for compatibility with the updated version of the collector. I have already tested the proposed changes, and everything worked as expected. Additionally, if it aligns with the goals of the example, there is an opportunity to include Service Performance Monitoring (SPM) in the Jaeger configuration, given that the example focuses on metrics. This is just a suggestion for further enhancement.

Additional context

I found the issue #16613, created in 2023 with the never stale label, which proposed some corrections to the collector configuration. Upon review, it appears these corrections have already been implemented. I would like to propose closing this issue since the solution has been applied. Additionally, I suggest updating the example configuration with a new pull request linked to this issue. If neither of these actions is deemed appropriate, it would make sense to close both the current issue and #16613 to avoid redundancy and ensure clarity in project tracking.

@apolzek apolzek added the needs triage New item requiring triage label Jan 6, 2025
@crobert-1
Copy link
Member

Updating the version makes sense to me, feel free to open a PR if you're interested!

@crobert-1 crobert-1 added examples/demo and removed needs triage New item requiring triage labels Jan 6, 2025
Copy link
Contributor

github-actions bot commented Jan 6, 2025

Pinging code owners for examples/demo: @open-telemetry/collector-approvers. See Adding Labels via Comments if you do not have permissions to add labels yourself. For example, comment '/label priority:p2 -needs-triaged' to set the priority and remove the needs-triaged label.

@apolzek
Copy link
Contributor Author

apolzek commented Jan 7, 2025

@crobert-1 PR opened. Do I need to run any additional tests or steps ? I have this doubt because it's not related to the collector code itself, and it's not a new component.

@crobert-1
Copy link
Member

@crobert-1 PR opened. Do I need to run any additional tests or steps ? I have this doubt because it's not related to the collector code itself, and it's not a new component.

Looks good to me! Your testing was great in my opinion, thanks!

AkhigbeEromo pushed a commit to sematext/opentelemetry-collector-contrib that referenced this issue Jan 13, 2025
…pen-telemetry#37031) (open-telemetry#37063)

Update docker image and collector configuration in examples/demo to keep
metrics working on port 8888

*The gap between versions 0.88.0 and 0.116.1 is widening*

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Update docker image used in the example from
otel/opentelemetry-collector:**0.88.0** to
otel/opentelemetry-collector:**0.116.1**. This update requires some
changes to the collector configuration (otel-collector-config.yaml) due
to a breaking change in the collector. In version 0.116.1, the collector
no longer exposes configurations on 0.0.0.0 by default.

Collector configuration to keep metrics working on port 8888

```
  telemetry:
    metrics:
      readers:
        - pull:
            exporter:
              prometheus:
                host: '0.0.0.0'
                port: 8888
```

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Closes open-telemetry#37031

<!--Describe what testing was performed and which tests were added.-->
#### Testing

- Traces are exactly the same in Jaeger after updating the image/config
- Traces are exactly the same in Zipkin after updating the image/config
- Metrics endpoint 8889 is working /metrics
- Metrics endpoint 8888 is working /metrics (after adjustment in the
collector at service/telemetry/metrics/readers)
<!--Describe the documentation added.-->

```
cd examples/demo/ && docker compose up
```
✔️ All services are up and running
✔️ Metric logs are visible
✔️ Trace logs are visible
✔️ Client and server tracing are available in both Zipkin and Jaeger

```
otel-collector-1     | 2025-01-07T10:43:29.029Z info    Traces  {"kind": "exporter", "data_type": "traces", "name": "debug", "resource spans": 1, "spans": 8}
otel-collector-1     | 2025-01-07T10:43:29.029Z info    Metrics {"kind": "exporter", "data_type": "metrics", "name": "debug", "resource metrics": 1, "metrics": 7, "data points": 7}
```

---------

Co-authored-by: Curtis Robert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants