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

Log the ports that jaegerreceiver listens to #6412

Closed
yurishkuro opened this issue Dec 25, 2024 · 0 comments · Fixed by open-telemetry/opentelemetry-collector-contrib#36961
Closed
Labels
area/otel enhancement good first issue Good for beginners help wanted Features that maintainers are willing to accept but do not have cycles to implement

Comments

@yurishkuro
Copy link
Member

yurishkuro commented Dec 25, 2024

The implementation for this issue is actually in the OTEL/contrib/jaegerreceiver module. By convention Jaeger internal extensions try to log which ports / endpoints they are listening when creating the servers, e.g.:

  • Serving metrics {"address": "localhost:8888", "metrics level": "Detailed"}
  • Query server started {"kind": "extension", "name": "jaeger_query", "http_addr": "[::]:16686", "grpc_addr": "[::]:16685"}
  • Starting GRPC server {"kind": "extension", "name": "jaeger_query", "port": 16685, "addr": ":16685"}
  • Starting HTTP server {"kind": "extension", "name": "jaeger_query", "port": 16686, "addr": ":16686"}

(side note: the log from Query server should be split into two lines)

However, the jaegerreceiver that we're importing from OTEL/contrib is not logging any of the ports / endpoints, even though in all-in-one configuratiob we enable all four:

      grpc:
        endpoint: "${env:JAEGER_LISTEN_HOST:-localhost}:14250"
      thrift_http:
        endpoint: "${env:JAEGER_LISTEN_HOST:-localhost}:14268"
      thrift_binary:
        endpoint: "${env:JAEGER_LISTEN_HOST:-localhost}:6832"
      thrift_compact:
        endpoint: "${env:JAEGER_LISTEN_HOST:-localhost}:6831"

The goal is to make changes upstream to log a similar "Server started" log for each port that jaegerreceiver is listening to. For the reference of how it's done we can look at OTLP receiver that does log its endpoints:

  • Starting GRPC server {"kind": "receiver", "name": "otlp", "data_type": "traces", "endpoint": "localhost:4317"}
  • Starting HTTP server {"kind": "receiver", "name": "otlp", "data_type": "traces", "endpoint": "localhost:4318"}
@yurishkuro yurishkuro added good first issue Good for beginners help wanted Features that maintainers are willing to accept but do not have cycles to implement labels Dec 25, 2024
songy23 pushed a commit to open-telemetry/opentelemetry-collector-contrib that referenced this issue Jan 22, 2025
…in jaegerreceiver (#36961)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
- This PR adds the logging related to the server starting under the
[jaegerreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jaegerreceiver)
- Added logs when: GRPC, Thrift Http, Thrift Binary and Thrift compact
server starts

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes jaegertracing/jaeger#6412


#### How was change tested?

Running collector with `jaegerreceiver` enabled with its all transports


#### Output

```
@Saumya40-codes ➜ /workspaces/opentelemetry-collector-contrib (log-endpoints) $ ./bin/otelcontribcol_linux_amd64 --config config.yaml
2024-12-27T15:37:23.428Z        info    service@v0.116.1-0.20241220212031-7c2639723f67/service.go:164   Setting up own telemetry...
2024-12-27T15:37:23.428Z        info    telemetry/metrics.go:70 Serving metrics {"address": "localhost:8888", "metrics level": "Normal"}
2024-12-27T15:37:23.428Z        info    builders/builders.go:26 Development component. May change in the future.        {"kind": "exporter", "data_type": "traces", "name": "debug"}
2024-12-27T15:37:23.436Z        info    service@v0.116.1-0.20241220212031-7c2639723f67/service.go:230   Starting otelcontribcol...      {"Version": "0.116.0-dev", "NumCPU": 2}
2024-12-27T15:37:23.436Z        info    extensions/extensions.go:39     Starting extensions...
2024-12-27T15:37:23.436Z        info    jaegerreceiver@v0.116.0/trace_receiver.go:252   Starting UDP server for Binary Thrift   {"kind": "receiver", "name": "jaeger", "data_type": "traces", "endpoint": "0.0.0.0:6831"}
2024-12-27T15:37:23.436Z        info    jaegerreceiver@v0.116.0/trace_receiver.go:274   Starting UDP server for Compact Thrift  {"kind": "receiver", "name": "jaeger", "data_type": "traces", "endpoint": "0.0.0.0:6832"}
2024-12-27T15:37:23.436Z        info    jaegerreceiver@v0.116.0/trace_receiver.go:398   Starting HTTP server for Jaeger Collector       {"kind": "receiver", "name": "jaeger", "data_type": "traces", "endpoint": "0.0.0.0:14268"}
2024-12-27T15:37:23.436Z        info    jaegerreceiver@v0.116.0/trace_receiver.go:423   Starting gRPC server for Jaeger Collector       {"kind": "receiver", "name": "jaeger", "data_type": "traces", "endpoint": "0.0.0.0:14250"}
2024-12-27T15:37:23.436Z        info    service@v0.116.1-0.20241220212031-7c2639723f67/service.go:253   Everything is ready. Begin running and processing data.
```


#### config file used

```
receivers:
  jaeger:
    protocols:
      grpc:
        endpoint: "0.0.0.0:14250"
      thrift_http:
        endpoint: "0.0.0.0:14268"
      thrift_binary:
        endpoint: "0.0.0.0:6831"
      thrift_compact:
        endpoint: "0.0.0.0:6832"
        
exporters:
  debug: {}

service:
  pipelines:
    traces:
      receivers: [jaeger]
      exporters: [debug]
```

cc @fatsheep9146

---------

Signed-off-by: Saumyacodes-40 <saumyabshah90@gmail.com>
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
chengchuanpeng pushed a commit to chengchuanpeng/opentelemetry-collector-contrib that referenced this issue Jan 26, 2025
…in jaegerreceiver (open-telemetry#36961)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
- This PR adds the logging related to the server starting under the
[jaegerreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jaegerreceiver)
- Added logs when: GRPC, Thrift Http, Thrift Binary and Thrift compact
server starts

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes jaegertracing/jaeger#6412


#### How was change tested?

Running collector with `jaegerreceiver` enabled with its all transports


#### Output

```
@Saumya40-codes ➜ /workspaces/opentelemetry-collector-contrib (log-endpoints) $ ./bin/otelcontribcol_linux_amd64 --config config.yaml
2024-12-27T15:37:23.428Z        info    service@v0.116.1-0.20241220212031-7c2639723f67/service.go:164   Setting up own telemetry...
2024-12-27T15:37:23.428Z        info    telemetry/metrics.go:70 Serving metrics {"address": "localhost:8888", "metrics level": "Normal"}
2024-12-27T15:37:23.428Z        info    builders/builders.go:26 Development component. May change in the future.        {"kind": "exporter", "data_type": "traces", "name": "debug"}
2024-12-27T15:37:23.436Z        info    service@v0.116.1-0.20241220212031-7c2639723f67/service.go:230   Starting otelcontribcol...      {"Version": "0.116.0-dev", "NumCPU": 2}
2024-12-27T15:37:23.436Z        info    extensions/extensions.go:39     Starting extensions...
2024-12-27T15:37:23.436Z        info    jaegerreceiver@v0.116.0/trace_receiver.go:252   Starting UDP server for Binary Thrift   {"kind": "receiver", "name": "jaeger", "data_type": "traces", "endpoint": "0.0.0.0:6831"}
2024-12-27T15:37:23.436Z        info    jaegerreceiver@v0.116.0/trace_receiver.go:274   Starting UDP server for Compact Thrift  {"kind": "receiver", "name": "jaeger", "data_type": "traces", "endpoint": "0.0.0.0:6832"}
2024-12-27T15:37:23.436Z        info    jaegerreceiver@v0.116.0/trace_receiver.go:398   Starting HTTP server for Jaeger Collector       {"kind": "receiver", "name": "jaeger", "data_type": "traces", "endpoint": "0.0.0.0:14268"}
2024-12-27T15:37:23.436Z        info    jaegerreceiver@v0.116.0/trace_receiver.go:423   Starting gRPC server for Jaeger Collector       {"kind": "receiver", "name": "jaeger", "data_type": "traces", "endpoint": "0.0.0.0:14250"}
2024-12-27T15:37:23.436Z        info    service@v0.116.1-0.20241220212031-7c2639723f67/service.go:253   Everything is ready. Begin running and processing data.
```


#### config file used

```
receivers:
  jaeger:
    protocols:
      grpc:
        endpoint: "0.0.0.0:14250"
      thrift_http:
        endpoint: "0.0.0.0:14268"
      thrift_binary:
        endpoint: "0.0.0.0:6831"
      thrift_compact:
        endpoint: "0.0.0.0:6832"
        
exporters:
  debug: {}

service:
  pipelines:
    traces:
      receivers: [jaeger]
      exporters: [debug]
```

cc @fatsheep9146

---------

Signed-off-by: Saumyacodes-40 <saumyabshah90@gmail.com>
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/otel enhancement good first issue Good for beginners help wanted Features that maintainers are willing to accept but do not have cycles to implement
Projects
None yet
1 participant