Skip to content

Commit

Permalink
feat: new instrumentation configs for opamp server (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
blumamir authored Jul 17, 2024
1 parent b8b3937 commit 99b98af
Showing 1 changed file with 120 additions and 16 deletions.
136 changes: 120 additions & 16 deletions charts/odigos/templates/crds/instrumentationconfig.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
name: instrumentationconfigs.odigos.io
spec:
group: odigos.io
Expand All @@ -12,52 +14,154 @@ spec:
scope: Namespaced
versions:
- name: v1alpha1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
description: InstrumentationConfig is the Schema for the instrumentationconfig API
description: InstrumentationConfig is the Schema for the instrumentationconfig
API
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
type: object
description: Config for the OpenTelemetry SDKs that should be applied to a workload. The workload is identified by the owner reference
description: |-
Config for the OpenTelemeetry SDKs that should be applied to a workload.
The workload is identified by the owner reference
properties:
config:
type: array
description: |-
config for this workload.
the config is a list to allow for multiple config options and values to be applied.
the list is processed in order, and the first matching config is applied.
items:
type: object
description: |-
WorkloadInstrumentationConfig defined a single config option to apply
on a workload, along with it's value, filters and instrumentation libraries
properties:
instrumentationLibraries:
type: array
description: |-
a list of instrumentation libraries to apply this setting to
if a library is not in this list, the setting should not apply to it
and should be cleared.
items:
type: object
description: InstrumentationLibrary represents a library for
instrumentation
properties:
instrumentationLibraryName:
description: InstrumentationLibraryName is the name of
the instrumentation library
type: string
language:
description: Language is the programming language of the
library
enum:
- java
- python
- go
- dotnet
- javascript
- mysql
- unknown
- ignored
type: string
required:
- instrumentationLibraryName
- language
type: object
type: array
optionKey:
description: |-
OptionKey is the name of the option
This value is transparent to the CRD and is passed as-is to the SDK.
type: string
optionValueBoolean:
description: OptionValueBoolean is the boolean value of the
option if it is a boolean
type: boolean
spanKind:
type: string
description: |-
This option allow to specify the config option for a specific span kind
for example, only to client spans or only to server spans.
it the span kind is not specified, the option will apply to all spans.
enum:
- client
- server
- producer
- consumer
- internal
optionValueBoolean:
type: boolean
required:
- config
status:
type: string
required:
- instrumentationLibraries
- optionKey
type: object
type: array
sdkConfigs:
description: |-
Configuration for the OpenTelemetry SDKs that this workload should use.
The SDKs are identified by the programming language they are written in.
TODO: consider adding more granular control over the SDKs, such as community/enterprise, native/ebpf.
items:
properties:
instrumentationLibraryConfigs:
description: configurations for the instrumentation libraries
the the SDK should use
items:
properties:
instrumentationLibraryName:
description: |-
The name of the instrumentation library
- Node.js: The name of the npm package: `@opentelemetry/instrumentation-<name>`
type: string
traceConfig:
properties:
enabled:
description: |-
Whether the instrumentation library is enabled to record traces.
When false, it is expected that the instrumentation library does not produce any spans regardless of any other configuration.
When true, the instrumentation library should produce spans according to the other configuration options.
If not specified, the default value for this signal should be used (whether to enable libraries by default or not).
type: boolean
type: object
required:
- instrumentationLibraryName
type: object
type: array
language:
description: The language of the SDK being configured
enum:
- java
- python
- go
- dotnet
- javascript
- mysql
- unknown
- ignored
type: string
required:
- instrumentationLibraryConfigs
- language
type: object
type: array
required:
- config
- sdkConfigs
type: object
type: object
served: true
storage: true
subresources:
status: {}

0 comments on commit 99b98af

Please sign in to comment.