Skip to content

Commit

Permalink
chore: make java native instrumentations default for enterprise (#2174)
Browse files Browse the repository at this point in the history
  • Loading branch information
blumamir authored Jan 10, 2025
1 parent 6521cff commit fe87147
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion cli/cmd/resources/profiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func GetAvailableCommunityProfiles() []k8sprofiles.Profile {

func GetAvailableOnPremProfiles() []k8sprofiles.Profile {
return append([]k8sprofiles.Profile{k8sprofiles.FullPayloadCollectionProfile, k8sprofiles.DbPayloadCollectionProfile, k8sprofiles.CategoryAttributesProfile,
k8sprofiles.HostnameAsPodNameProfile, k8sprofiles.JavaNativeInstrumentationsProfile, k8sprofiles.KratosProfile, k8sprofiles.QueryOperationDetector,
k8sprofiles.HostnameAsPodNameProfile, k8sprofiles.JavaNativeInstrumentationsProfile, k8sprofiles.JavaEbpfInstrumentationsProfile, k8sprofiles.KratosProfile, k8sprofiles.QueryOperationDetector,
k8sprofiles.SmallBatchesProfile},
GetAvailableCommunityProfiles()...)
}
Expand Down
12 changes: 12 additions & 0 deletions cli/cmd/resources/profiles/java-ebpf-instrumentations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: odigos.io/v1alpha1
kind: InstrumentationRule
metadata:
name: java-ebpf-instrumentations
spec:
ruleName: "java ebpf instrumentations"
notes: "Auto generated rule from java-ebpf-instrumentations profile. Do not edit."
otelSdks:
otelSdkByLanguage:
java:
sdkTier: "enterprise"
sdkType: "ebpf"
12 changes: 0 additions & 12 deletions cli/cmd/resources/profiles/java-native-instrumentations.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion instrumentor/sdks/sdks.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func otelSdkConfigCloud() map[common.ProgrammingLanguage]common.OtelSdk {

func otelSdkConfigOnPrem() map[common.ProgrammingLanguage]common.OtelSdk {
return map[common.ProgrammingLanguage]common.OtelSdk{
common.JavaProgrammingLanguage: common.OtelSdkEbpfEnterprise, // Notice - for onprem, the default for java is eBPF
common.JavaProgrammingLanguage: common.OtelSdkNativeEnterprise,
common.PythonProgrammingLanguage: common.OtelSdkEbpfEnterprise,
common.GoProgrammingLanguage: common.OtelSdkEbpfEnterprise,
common.DotNetProgrammingLanguage: common.OtelSdkNativeCommunity,
Expand Down
11 changes: 8 additions & 3 deletions k8sutils/pkg/profiles/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ var (
}
JavaNativeInstrumentationsProfile = Profile{
ProfileName: common.ProfileName("java-native-instrumentations"),
ShortDescription: "Instrument Java applications using native instrumentation and eBPF enterprise processing",
ShortDescription: "Deprecated, native instrumentations are now enabled by default",
}
JavaEbpfInstrumentationsProfile = Profile{
ProfileName: common.ProfileName("java-ebpf-instrumentations"),
ShortDescription: "Instrument Java applications using eBPF instrumentation and eBPF enterprise processing",
KubeObject: &odigosv1alpha1.InstrumentationRule{},
}
CodeAttributesProfile = Profile{
Expand All @@ -92,8 +96,8 @@ var (
}
KratosProfile = Profile{
ProfileName: common.ProfileName("kratos"),
ShortDescription: "Bundle profile that includes db-payload-collection, semconv, category-attributes, copy-scope, hostname-as-podname, java-native-instrumentations, code-attributes, query-operation-detector, disableNameProcessorProfile, small-batches, size_m, allow_concurrent_agents",
Dependencies: []common.ProfileName{"db-payload-collection", "semconv", "category-attributes", "copy-scope", "hostname-as-podname", "java-native-instrumentations", "code-attributes", "query-operation-detector", "disableNameProcessorProfile", "small-batches", "size_m", "allow_concurrent_agents"},
ShortDescription: "Bundle profile that includes db-payload-collection, semconv, category-attributes, copy-scope, hostname-as-podname, code-attributes, query-operation-detector, disableNameProcessorProfile, small-batches, size_m, allow_concurrent_agents",
Dependencies: []common.ProfileName{"db-payload-collection", "semconv", "category-attributes", "copy-scope", "hostname-as-podname", "code-attributes", "query-operation-detector", "disableNameProcessorProfile", "small-batches", "size_m", "allow_concurrent_agents"},
}
ProfilesMap = map[common.ProfileName]Profile{
SizeSProfile.ProfileName: SizeSProfile,
Expand All @@ -107,6 +111,7 @@ var (
CopyScopeProfile.ProfileName: CopyScopeProfile,
HostnameAsPodNameProfile.ProfileName: HostnameAsPodNameProfile,
JavaNativeInstrumentationsProfile.ProfileName: JavaNativeInstrumentationsProfile,
JavaEbpfInstrumentationsProfile.ProfileName: JavaEbpfInstrumentationsProfile,
CodeAttributesProfile.ProfileName: CodeAttributesProfile,
DisableNameProcessorProfile.ProfileName: DisableNameProcessorProfile,
SmallBatchesProfile.ProfileName: SmallBatchesProfile,
Expand Down

0 comments on commit fe87147

Please sign in to comment.