From 72d925bd08a5c5195f9a1b207e710b8ba04fde3b Mon Sep 17 00:00:00 2001 From: Eden Federman Date: Tue, 28 Jan 2025 16:34:21 +0200 Subject: [PATCH] Add legacy dotnet support (#2323) Co-authored-by: Amir Blum --- profiles/aggregators/greatwall.go | 3 ++- profiles/allprofiles.go | 1 + profiles/instrumentation/dotnet_distro.go | 12 ++++++++++++ .../manifests/legacy-dotnet-instrumentation.yaml | 12 ++++++++++++ 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 profiles/instrumentation/dotnet_distro.go create mode 100644 profiles/manifests/legacy-dotnet-instrumentation.yaml diff --git a/profiles/aggregators/greatwall.go b/profiles/aggregators/greatwall.go index 54b713b3a..01161b62c 100644 --- a/profiles/aggregators/greatwall.go +++ b/profiles/aggregators/greatwall.go @@ -9,8 +9,9 @@ var GreatwallProfile = profile.Profile{ ProfileName: common.ProfileName("greatwall"), MinimumTier: common.OnPremOdigosTier, ShortDescription: "Bundle profile that includes " + - "java-ebpf-instrumentations", + "java-ebpf-instrumentations and legacy-dotnet-instrumentation", Dependencies: []common.ProfileName{ "java-ebpf-instrumentations", + "legacy-dotnet-instrumentation", }, } diff --git a/profiles/allprofiles.go b/profiles/allprofiles.go index 193615248..82dde6c01 100644 --- a/profiles/allprofiles.go +++ b/profiles/allprofiles.go @@ -27,6 +27,7 @@ var AllProfiles = []profile.Profile{ instrumentation.AllowConcurrentAgents, instrumentation.JavaEbpfInstrumentationsProfile, instrumentation.JavaNativeInstrumentationsProfile, + instrumentation.LegacyDotNetProfile, pipeline.DisableNameProcessorProfile, pipeline.SmallBatchesProfile, diff --git a/profiles/instrumentation/dotnet_distro.go b/profiles/instrumentation/dotnet_distro.go new file mode 100644 index 000000000..36c0554c3 --- /dev/null +++ b/profiles/instrumentation/dotnet_distro.go @@ -0,0 +1,12 @@ +package instrumentation + +import ( + "github.com/odigos-io/odigos/common" + "github.com/odigos-io/odigos/profiles/profile" +) + +var LegacyDotNetProfile = profile.Profile{ + ProfileName: common.ProfileName("legacy-dotnet-instrumentation"), + MinimumTier: common.OnPremOdigosTier, + ShortDescription: "Instrument DotNet applications using legacy OpenTelemetry instrumentation (needed for 6.0 support)", +} diff --git a/profiles/manifests/legacy-dotnet-instrumentation.yaml b/profiles/manifests/legacy-dotnet-instrumentation.yaml new file mode 100644 index 000000000..bf1bd3e5b --- /dev/null +++ b/profiles/manifests/legacy-dotnet-instrumentation.yaml @@ -0,0 +1,12 @@ +apiVersion: odigos.io/v1alpha1 +kind: InstrumentationRule +metadata: + name: legacy-dotnet-instrumentation +spec: + ruleName: "legacy dotnet instrumentation" + notes: "Auto generated rule from legacy-dotnet-instrumentation profile. Do not edit." + otelSdks: + otelSdkByLanguage: + dotnet: + sdkTier: "enterprise" + sdkType: "native"