Skip to content

Commit

Permalink
OpenTelemetry updates (#1541)
Browse files Browse the repository at this point in the history
* OpenTelemetry updates

* Couple tweaks

* Fix environment

* Filter out websocket API
  • Loading branch information
ejsmith authored Apr 7, 2024
1 parent 5033f18 commit 48b2851
Show file tree
Hide file tree
Showing 15 changed files with 199 additions and 162 deletions.
2 changes: 1 addition & 1 deletion k8s/elastic-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ metadata:
name: elastic-monitor
namespace: elastic-system
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
nginx.ingress.kubernetes.io/proxy-ssl-verify: "off"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
ingressClassName: nginx
tls:
- hosts:
- kibana.exceptionless.io
Expand Down
5 changes: 1 addition & 4 deletions k8s/ex-prod-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ config:
EX_TestEmailAddress: "[email protected]"
EX_EnableArchive: "false"
EX_Serilog__MinimumLevel__Default: "Warning"
EX_Apm__Endpoint: http://apm.elastic-system.svc:8200
EX_OTEL_EXPORTER_OTLP_ENDPOINT: http://apm.elastic-system.svc:8200
EX_Apm__EnableLogs: "true"
EX_Apm__EnableMetrics: "true"
EX_Apm__EnableTracing: "true"
EX_Apm__FullDetails: "true"
EX_Apm__Insecure: "true"
1 change: 1 addition & 0 deletions src/Exceptionless.Job/Exceptionless.Job.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<PackageReference Include="OpenTelemetry.Instrumentation.StackExchangeRedis" Version="1.0.0-rc9.14" />
<PackageReference Include="OpenTelemetry.Instrumentation.ElasticsearchClient" Version="1.0.0-beta.5" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.8.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Process" Version="0.5.0-beta.5" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions src/Exceptionless.Job/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ public static IHostBuilder CreateHostBuilder(string[] args)
if (!String.IsNullOrEmpty(options.ExceptionlessApiKey) && !String.IsNullOrEmpty(options.ExceptionlessServerUrl))
app.UseExceptionless(ExceptionlessClient.Default);

if (apmConfig.EnableMetrics)
app.UseOpenTelemetryPrometheusScrapingEndpoint();
app.UseOpenTelemetryPrometheusScrapingEndpoint();

app.UseHealthChecks("/health", new HealthCheckOptions
{
Expand Down
4 changes: 0 additions & 4 deletions src/Exceptionless.Job/appsettings.Development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ Serilog:
Default: Debug

Apm:
#Endpoint: http://host.docker.internal:8200
Insecure: true
EnableLogs: false
EnableTracing: false
EnableMetrics: true
FullDetails: true
Debug: false
Console: false
2 changes: 1 addition & 1 deletion src/Exceptionless.Job/appsettings.Staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Serilog:
Default: Warning
WriteTo:
- Name: Console
Args:
Args:
theme: "Serilog.Sinks.SystemConsole.Themes.ConsoleTheme::None, Serilog.Sinks.Console"

Apm:
Expand Down
7 changes: 2 additions & 5 deletions src/Exceptionless.Job/appsettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Serilog:
Foundatio: Information
WriteTo:
- Name: Console
Args:
Args:
theme: "Serilog.Sinks.SystemConsole.Themes.AnsiConsoleTheme::Literate, Serilog.Sinks.Console"
Enrich:
- FromLogContext
Expand All @@ -27,8 +27,5 @@ Serilog:
Apm:
ServiceName: exceptionless
EnableLogs: true
EnableTracing: true
EnableMetrics: true
SampleRate: 1.0
FullDetails: true
Debug: false
Debug: false
Loading

0 comments on commit 48b2851

Please sign in to comment.