I have setup the signoz self hosted and a django applications. I am able to see all my traces and me...
w

Work

7 months ago
I have setup the signoz self hosted and a django applications. I am able to see all my traces and metrics but logs are not visible can anyone tell me any possible reason for it. I have added this is gunicorn.conf.py
import os
from opentelemetry import trace, metrics
from opentelemetry.sdk.resources import Resource
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.metrics import MeterProvider
from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader
from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import OTLPMetricExporter
from opentelemetry.instrumentation.django import DjangoInstrumentor
from opentelemetry.instrumentation.logging import LoggingInstrumentor
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry import trace
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk.resources import Resource
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.instrumentation.django import DjangoInstrumentor  # Ensure to import this
from opentelemetry.instrumentation.logging import LoggingInstrumentor

def post_fork(server, worker):
    # As before, set up traces
    resource = Resource.create(attributes={
        "service.name": "iris-api-service"
    })
    trace.set_tracer_provider(TracerProvider(resource=resource))
    span_processor = BatchSpanProcessor(
        OTLPSpanExporter(endpoint=os.environ.get('OTEL_EXPORTER_OTLP_ENDPOINT'))
    )
    trace.get_tracer_provider().add_span_processor(span_processor)
    DjangoInstrumentor().instrument()
    LoggingInstrumentor().instrument(set_logging_format=True)

    # Metrics Configuration
    metrics_provider = MeterProvider(
        resource=resource,
        metric_readers=[
            PeriodicExportingMetricReader(
                OTLPMetricExporter(endpoint=os.getenv('OTEL_EXPORTER_OTLP_ENDPOINT'))
            )
        ]
    )
    metrics.set_meter_provider(metrics_provider)
Please guide here anything is missing here ?
The upgrade of 0.52.0 to 0.53.0 failed with this error. How can I fix this? I couldn't find any othe...
j

Joachim

about 1 year ago
The upgrade of 0.52.0 to 0.53.0 failed with this error. How can I fix this? I couldn't find any other help for this problem.
✘ Container otel-migrator          service "otel-collector-migrator" didn't complete successfully: exit 1
And the log of this container is
otel-migrator          | {"level":"info","timestamp":"2024-09-04T13:17:05.624Z","caller":"migrationmanager/manager.go:76","msg":"Running migrations for all migrators","component":"migrationmanager"}
otel-migrator          | {"level":"info","timestamp":"2024-09-04T13:17:05.624Z","caller":"migrationmanager/manager.go:78","msg":"Running migrations for logs","component":"migrationmanager","migrator":"logs"}
otel-migrator          | {"level":"error","timestamp":"2024-09-04T13:17:05.713Z","caller":"migrationmanager/manager.go:81","msg":"Failed to run migrations for migrator","component":"migrationmanager","migrator":"logs","error":"clickhouse migrate failed to run, error: Dirty database version 14. Fix and force version.","stacktrace":"<http://github.com/SigNoz/signoz-otel-collector/migrationmanager.(*MigrationManager).Migrate|github.com/SigNoz/signoz-otel-collector/migrationmanager.(*MigrationManager).Migrate>\n\t/home/runner/work/signoz-otel-collector/signoz-otel-collector/migrationmanager/manager.go:81\nmain.main\n\t/home/runner/work/signoz-otel-collector/signoz-otel-collector/cmd/signozschemamigrator/migrate.go:126\nruntime.main\n\t/opt/hostedtoolcache/go/1.21.13/x64/src/runtime/proc.go:267"}
otel-migrator          | {"level":"fatal","timestamp":"2024-09-04T13:17:05.714Z","caller":"signozschemamigrator/migrate.go:128","msg":"Failed to run migrations","component":"migrate cli","error":"clickhouse migrate failed to run, error: Dirty database version 14. Fix and force version.","stacktrace":"main.main\n\t/home/runner/work/signoz-otel-collector/signoz-otel-collector/cmd/signozschemamigrator/migrate.go:128\nruntime.main\n\t/opt/hostedtoolcache/go/1.21.13/x64/src/runtime/proc.go:267"}