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

Example in opentelemetry-python/docs/examples/logs/ doesn't produce expected behaviour in the collector #3199

Closed
rawmarshmellows opened this issue Feb 25, 2023 · 3 comments · Fixed by #3215
Labels
bug Something isn't working

Comments

@rawmarshmellows
Copy link

rawmarshmellows commented Feb 25, 2023

Describe your environment

Python version = 3.9.15
opentelemetry-distro = "^0.36b0"
opentelemetry-exporter-otlp = "^1.15.0"
opentelemetry-sdk = "^1.16.0"

Steps to reproduce
I followed the example

What is the expected behavior?
I expected to see the logs being shown in the console for which is running my Docker container

What is the actual behavior?
What did you see instead?
I didn't see any logs

Additional context
Add any other context about the problem here.

@rawmarshmellows rawmarshmellows added the bug Something isn't working label Feb 25, 2023
@lzchen
Copy link
Contributor

lzchen commented Feb 27, 2023

@rawmarshmellows
Can you post a screenshot of what you see for your console.

@rawmarshmellows
Copy link
Author

rawmarshmellows commented Feb 27, 2023

Please see the pasted console logs below:

docker run \                           
    -p 4317:4317 \
    -v $(pwd)/otl-collector-config.yaml:/etc/otel/config.yaml \
    otel/opentelemetry-collector-contrib:latest

2023-02-25T02:14:05.257Z        info    service/telemetry.go:90 Setting up own telemetry...
2023-02-25T02:14:05.257Z        info    service/telemetry.go:116        Serving Prometheus metrics      {"address": ":8888", "level": "Basic"}
2023-02-25T02:14:05.257Z        info    exporter/exporter.go:290        Development component. May change in the future.        {"kind": "exporter", "data_type": "traces", "name": "logging"}
2023-02-25T02:14:05.257Z        info    exporter/exporter.go:290        Development component. May change in the future.        {"kind": "exporter", "data_type": "metrics", "name": "logging"}
2023-02-25T02:14:05.263Z        info    service/service.go:128  Starting otelcol-contrib...     {"Version": "0.70.0", "NumCPU": 28}
2023-02-25T02:14:05.263Z        info    extensions/extensions.go:41     Starting extensions...
2023-02-25T02:14:05.263Z        info    extensions/extensions.go:44     Extension is starting...        {"kind": "extension", "name": "zpages"}
2023-02-25T02:14:05.263Z        info    zpagesextension@v0.70.0/zpagesextension.go:64   Registered zPages span processor on tracer provider     {"kind": "extension", "name": "zpages"}
2023-02-25T02:14:05.263Z        info    zpagesextension@v0.70.0/zpagesextension.go:74   Registered Host's zPages        {"kind": "extension", "name": "zpages"}
2023-02-25T02:14:05.263Z        info    zpagesextension@v0.70.0/zpagesextension.go:86   Starting zPages extension       {"kind": "extension", "name": "zpages", "config": {"TCPAddr":{"Endpoint":"0.0.0.0:55679"}}}
2023-02-25T02:14:05.263Z        info    extensions/extensions.go:48     Extension started.      {"kind": "extension", "name": "zpages"}
2023-02-25T02:14:05.263Z        info    extensions/extensions.go:44     Extension is starting...        {"kind": "extension", "name": "health_check"}
2023-02-25T02:14:05.263Z        info    healthcheckextension@v0.70.0/healthcheckextension.go:45 Starting health_check extension {"kind": "extension", "name": "health_check", "config": {"Endpoint":"0.0.0.0:13133","TLSSetting":null,"CORS":null,"Auth":null,"MaxRequestBodySize":0,"IncludeMetadata":false,"Path":"/","CheckCollectorPipeline":{"Enabled":false,"Interval":"5m","ExporterFailureThreshold":5}}}
2023-02-25T02:14:05.263Z        warn    internal/warning.go:51  Using the 0.0.0.0 address exposes this server to every network interface, which may facilitate Denial of Service attacks        {"kind": "extension", "name": "health_check", "documentation": "https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks"}
2023-02-25T02:14:05.263Z        info    extensions/extensions.go:48     Extension started.      {"kind": "extension", "name": "health_check"}
2023-02-25T02:14:05.263Z        info    extensions/extensions.go:44     Extension is starting...        {"kind": "extension", "name": "pprof"}
2023-02-25T02:14:05.264Z        info    pprofextension@v0.70.0/pprofextension.go:71     Starting net/http/pprof server  {"kind": "extension", "name": "pprof", "config": {"TCPAddr":{"Endpoint":"0.0.0.0:1777"},"BlockProfileFraction":0,"MutexProfileFraction":0,"SaveToFile":""}}
2023-02-25T02:14:05.264Z        info    extensions/extensions.go:48     Extension started.      {"kind": "extension", "name": "pprof"}
2023-02-25T02:14:05.264Z        info    service/pipelines.go:86 Starting exporters...
2023-02-25T02:14:05.264Z        info    service/pipelines.go:90 Exporter is starting... {"kind": "exporter", "data_type": "traces", "name": "logging"}
2023-02-25T02:14:05.264Z        info    service/pipelines.go:94 Exporter started.       {"kind": "exporter", "data_type": "traces", "name": "logging"}
2023-02-25T02:14:05.264Z        info    service/pipelines.go:90 Exporter is starting... {"kind": "exporter", "data_type": "metrics", "name": "logging"}
2023-02-25T02:14:05.264Z        info    service/pipelines.go:94 Exporter started.       {"kind": "exporter", "data_type": "metrics", "name": "logging"}
2023-02-25T02:14:05.264Z        info    service/pipelines.go:98 Starting processors...
2023-02-25T02:14:05.264Z        info    service/pipelines.go:102        Processor is starting...        {"kind": "processor", "name": "batch", "pipeline": "traces"}
2023-02-25T02:14:05.264Z        info    service/pipelines.go:106        Processor started.      {"kind": "processor", "name": "batch", "pipeline": "traces"}
2023-02-25T02:14:05.264Z        info    service/pipelines.go:102        Processor is starting...        {"kind": "processor", "name": "batch", "pipeline": "metrics"}
2023-02-25T02:14:05.264Z        info    service/pipelines.go:106        Processor started.      {"kind": "processor", "name": "batch", "pipeline": "metrics"}
2023-02-25T02:14:05.264Z        info    service/pipelines.go:110        Starting receivers...
2023-02-25T02:14:05.264Z        info    service/pipelines.go:114        Receiver is starting... {"kind": "receiver", "name": "zipkin", "pipeline": "traces"}
2023-02-25T02:14:05.264Z        warn    internal/warning.go:51  Using the 0.0.0.0 address exposes this server to every network interface, which may facilitate Denial of Service attacks        {"kind": "receiver", "name": "zipkin", "pipeline": "traces", "documentation": "https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks"}
2023-02-25T02:14:05.264Z        info    service/pipelines.go:118        Receiver started.       {"kind": "receiver", "name": "zipkin", "pipeline": "traces"}
2023-02-25T02:14:05.264Z        info    service/pipelines.go:114        Receiver is starting... {"kind": "receiver", "name": "otlp", "pipeline": "traces"}
2023-02-25T02:14:05.264Z        warn    internal/warning.go:51  Using the 0.0.0.0 address exposes this server to every network interface, which may facilitate Denial of Service attacks        {"kind": "receiver", "name": "otlp", "pipeline": "traces", "documentation": "https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks"}
2023-02-25T02:14:05.264Z        info    otlpreceiver@v0.70.0/otlp.go:94 Starting GRPC server    {"kind": "receiver", "name": "otlp", "pipeline": "traces", "endpoint": "0.0.0.0:4317"}
2023-02-25T02:14:05.264Z        warn    internal/warning.go:51  Using the 0.0.0.0 address exposes this server to every network interface, which may facilitate Denial of Service attacks        {"kind": "receiver", "name": "otlp", "pipeline": "traces", "documentation": "https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks"}
2023-02-25T02:14:05.264Z        info    otlpreceiver@v0.70.0/otlp.go:112        Starting HTTP server    {"kind": "receiver", "name": "otlp", "pipeline": "traces", "endpoint": "0.0.0.0:4318"}
2023-02-25T02:14:05.264Z        info    service/pipelines.go:118        Receiver started.       {"kind": "receiver", "name": "otlp", "pipeline": "traces"}
2023-02-25T02:14:05.264Z        info    service/pipelines.go:114        Receiver is starting... {"kind": "receiver", "name": "opencensus", "pipeline": "traces"}
2023-02-25T02:14:05.264Z        warn    internal/warning.go:51  Using the 0.0.0.0 address exposes this server to every network interface, which may facilitate Denial of Service attacks        {"kind": "receiver", "name": "opencensus", "pipeline": "traces", "documentation": "https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks"}
2023-02-25T02:14:05.265Z        info    service/pipelines.go:118        Receiver started.       {"kind": "receiver", "name": "opencensus", "pipeline": "traces"}
2023-02-25T02:14:05.265Z        info    service/pipelines.go:114        Receiver is starting... {"kind": "receiver", "name": "jaeger", "pipeline": "traces"}
2023-02-25T02:14:05.266Z        warn    internal/warning.go:51  Using the 0.0.0.0 address exposes this server to every network interface, which may facilitate Denial of Service attacks        {"kind": "receiver", "name": "jaeger", "pipeline": "traces", "documentation": "https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks"}
2023-02-25T02:14:05.266Z        warn    internal/warning.go:51  Using the 0.0.0.0 address exposes this server to every network interface, which may facilitate Denial of Service attacks        {"kind": "receiver", "name": "jaeger", "pipeline": "traces", "documentation": "https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks"}
2023-02-25T02:14:05.266Z        info    service/pipelines.go:118        Receiver started.       {"kind": "receiver", "name": "jaeger", "pipeline": "traces"}
2023-02-25T02:14:05.266Z        info    service/pipelines.go:114        Receiver is starting... {"kind": "receiver", "name": "opencensus", "pipeline": "metrics"}
2023-02-25T02:14:05.266Z        info    service/pipelines.go:118        Receiver started.       {"kind": "receiver", "name": "opencensus", "pipeline": "metrics"}
2023-02-25T02:14:05.266Z        info    service/pipelines.go:114        Receiver is starting... {"kind": "receiver", "name": "prometheus", "pipeline": "metrics"}
2023-02-25T02:14:05.266Z        info    prometheusreceiver@v0.70.0/metrics_receiver.go:255      Starting discovery manager      {"kind": "receiver", "name": "prometheus", "pipeline": "metrics"}
2023-02-25T02:14:05.266Z        info    prometheusreceiver@v0.70.0/metrics_receiver.go:243      Scrape job added        {"kind": "receiver", "name": "prometheus", "pipeline": "metrics", "jobName": "otel-collector"}
2023-02-25T02:14:05.266Z        info    service/pipelines.go:118        Receiver started.       {"kind": "receiver", "name": "prometheus", "pipeline": "metrics"}
2023-02-25T02:14:05.266Z        info    service/pipelines.go:114        Receiver is starting... {"kind": "receiver", "name": "otlp", "pipeline": "metrics"}
2023-02-25T02:14:05.266Z        info    service/pipelines.go:118        Receiver started.       {"kind": "receiver", "name": "otlp", "pipeline": "metrics"}
2023-02-25T02:14:05.266Z        info    healthcheck/handler.go:129      Health Check state change       {"kind": "extension", "name": "health_check", "status": "ready"}
2023-02-25T02:14:05.266Z        info    prometheusreceiver@v0.70.0/metrics_receiver.go:289      Starting scrape manager {"kind": "receiver", "name": "prometheus", "pipeline": "metrics"}
2023-02-25T02:14:05.266Z        info    service/service.go:145  Everything is ready. Begin running and processing data.
2023-02-25T02:14:11.877Z        info    TracesExporter  {"kind": "exporter", "data_type": "traces", "name": "logging", "#spans": 1}
2023-02-25T02:14:15.083Z        info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "#metrics": 21}
2023-02-25T02:14:15.083Z        info    TracesExporter  {"kind": "exporter", "data_type": "traces", "name": "logging", "#spans": 1}
2023-02-25T02:14:25.106Z        info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "#metrics": 25}
2023-02-25T02:14:35.128Z        info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "#metrics": 25}
2023-02-25T02:14:45.150Z        info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "#metrics": 25}
2023-02-25T02:14:55.172Z        info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "#metrics": 25}
2023-02-25T02:15:05.205Z        info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "#metrics": 25}
2023-02-25T02:15:15.039Z        info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "#metrics": 25}
2023-02-25T02:15:25.073Z        info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "#metrics": 25}
2023-02-25T02:15:35.107Z        info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "#metrics": 25}
2023-02-25T02:15:45.144Z        info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "#metrics": 25}
2023-02-25T02:15:55.182Z        info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "#metrics": 25}
2023-02-25T02:16:05.221Z        info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "#metrics": 25}
2023-02-25T02:16:15.062Z        info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "#metrics": 25}
2023-02-25T02:16:25.104Z        info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "#metrics": 25}
2023-02-25T02:16:35.146Z        info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "#metrics": 25}
2023-02-25T02:16:45.187Z        info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "#metrics": 25}
2023-02-25T02:16:55.230Z        info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "#metrics": 25}
2023-02-25T02:17:05.069Z        info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "#metrics": 25}
2023-02-25T02:17:15.111Z        info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "#metrics": 25}
2023-02-25T02:17:25.151Z        info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "#metrics": 25}
^C2023-02-25T02:17:26.294Z      info    otelcol/collector.go:234        Received signal from OS {"signal": "interrupt"}
2023-02-25T02:17:26.294Z        info    service/service.go:154  Starting shutdown...
2023-02-25T02:17:26.294Z        info    healthcheck/handler.go:129      Health Check state change       {"kind": "extension", "name": "health_check", "status": "unavailable"}
2023-02-25T02:17:26.294Z        info    service/pipelines.go:130        Stopping receivers...
2023-02-25T02:17:26.295Z        info    service/pipelines.go:137        Stopping processors...
2023-02-25T02:17:26.296Z        info    service/pipelines.go:144        Stopping exporters...
2023-02-25T02:17:26.296Z        info    extensions/extensions.go:55     Stopping extensions...
2023-02-25T02:17:26.296Z        info    zpagesextension@v0.70.0/zpagesextension.go:109  Unregistered zPages span processor on tracer provider   {"kind": "extension", "name": "zpages"}
2023-02-25T02:17:26.296Z        info    service/service.go:168  Shutdown complete.

@rawmarshmellows
Copy link
Author

Let me know if there is anything else I can do to help with the debugging or if there is a misunderstanding on my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants