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

solution for a collector #1

Closed
giuliohome opened this issue Aug 25, 2022 · 3 comments
Closed

solution for a collector #1

giuliohome opened this issue Aug 25, 2022 · 3 comments
Assignees

Comments

@giuliohome
Copy link
Owner

We can't send straight to grafana, apparently, but we need an agent or a collector. That must be running on his own, hence the runtime implementation "to-do".

@giuliohome giuliohome self-assigned this Aug 25, 2022
@giuliohome
Copy link
Owner Author

giuliohome commented Aug 25, 2022

  • For Gitlab, this is solved with a service
  • For Azure Pipeline, this is solved with a docker container running on a vmImage created on the fly for the pipeline
  • The missing part is the internal (e.g. dotnet api backend) tracing of the app on azure:
    • how complicated the docker compose approach (dotnet app + agent) for azure container/app services?
    • how costly is the cheapest kubernetes?
    • how much the cheapest vm (it looks like 8$ a month)
    • can be done with Azure Application Insights and Azure Monitor

@giuliohome
Copy link
Owner Author

giuliohome commented Aug 25, 2022

The latter seems the way to go for Azure Opentelemetry.

Will try inside my Azure DevOps project.

Well, there I'll opt for Azure Insights because it is more mature

@giuliohome
Copy link
Owner Author

giuliohome commented Aug 28, 2022

You can send opentelemetry traces to grafana cloud tempo saas without an agent or a collector: see my dotnet and python code also there.

.NET

            services.AddOpenTelemetryTracing((builder) => 
                builder
                    //https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/docs/trace/customizing-the-sdk/README.md
                    .AddSource("AzureTracer")
                    .SetResourceBuilder(ResourceBuilder.CreateDefault()
                        .AddService("API.TestBed"))
                    // Instrument HttpClient calls and pass on context
                    // .AddHttpClientInstrumentation() // catching azure live diagnostic
                    .AddAspNetCoreInstrumentation()
                    .AddSqlClientInstrumentation(
                        options => options.SetDbStatementForText = true)
                    .AddConsoleExporter()
                    .AddOtlpExporter(o =>
                    {
                        o.Endpoint = new Uri("https://tempo-eu-west-0.grafana.net"); //"http://otel-collector:4317");
                        string token = "my encoded token";
                        o.Headers = $"Authorization=Basic {token}";
                        o.ExportProcessorType = ExportProcessorType.Simple;
                    }));
        }

image

Python

Notice that for python it is necessary to upgrade to version 1.12 of opentelemetry sdk!

pip install --upgrade opentelemetry-exporter-otlp
pip install --upgrade opentelemetry-sdk

@giuliohome giuliohome pinned this issue Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant