Skip to content

Commit

Permalink
Merge branch 'main' into distroless-odiglet
Browse files Browse the repository at this point in the history
  • Loading branch information
RonFed authored Feb 8, 2025
2 parents 8213dee + fb4fa7f commit b4c4de1
Show file tree
Hide file tree
Showing 192 changed files with 5,713 additions and 4,729 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish-modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
git tag opampserver/${{ steps.extract_tag.outputs.tag }}
git tag procdiscovery/${{ steps.extract_tag.outputs.tag }}
git tag profiles/${{ steps.extract_tag.outputs.tag }}
git tag distros/${{ steps.extract_tag.outputs.tag }}
git push origin --tags
- name: Trigger Release PR in Odigos Enterprise
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ COPY api/ api/
COPY common/ common/
COPY k8sutils/ k8sutils/
COPY profiles/ profiles/
COPY distros/ distros/

WORKDIR /workspace/$SERVICE_NAME
RUN mkdir -p /workspace/build
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.rhel
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ COPY api/ api/
COPY common/ common/
COPY k8sutils/ k8sutils/
COPY profiles/ profiles/
COPY distros/ distros/

WORKDIR /workspace/$SERVICE_NAME
RUN mkdir -p /workspace/build
Expand Down
26 changes: 24 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ update-dep/%:
cd $(DIR) && go get $(MODULE)@$(VERSION)

GO_AUTO_VERSION=v0.19.0-alpha
UNSTABLE_COLLECTOR_VERSION=v0.118.0
STABLE_COLLECTOR_VERSION=v1.24.0
UNSTABLE_COLLECTOR_VERSION=v0.119.0
STABLE_COLLECTOR_VERSION=v1.25.0
STABLE_OTEL_GO_VERSION=v1.34.0
UNSTABLE_OTEL_GO_VERSION=v0.59.0

Expand Down Expand Up @@ -337,6 +337,28 @@ dev-tests-setup: dev-tests-kind-cluster cli-build build-images load-to-kind
dev-tests-setup-no-build: TAG := e2e-test
dev-tests-setup-no-build: dev-tests-kind-cluster load-to-kind

# When you run an e2e test locally, and want a grafana instance to troubleshoot the results
# run this target to start grafana, then run dev-tests-grafana-port-forward to access it.
.PHONY: dev-tests-grafana
dev-tests-grafana:
@echo "Starting Grafana for troubleshooting e2e tests"
helm install -n traces grafana grafana/grafana \
--set "env.GF_AUTH_ANONYMOUS_ENABLED=true" \
--set "env.GF_AUTH_ANONYMOUS_ORG_ROLE=Admin" \
--set "datasources.datasources\.yaml.apiVersion=1" \
--set "datasources.datasources\.yaml.datasources[0].name=Tempo" \
--set "datasources.datasources\.yaml.datasources[0].type=tempo" \
--set "datasources.datasources\.yaml.datasources[0].url=http://e2e-tests-tempo:3100" \
--set "datasources.datasources\.yaml.datasources[0].access=proxy" \
--set "datasources.datasources\.yaml.datasources[0].isDefault=true"

# For e2e local tests, run this target to port forward the Grafana instance to your local browser
.PHONY: dev-tests-grafana-port-forward
dev-tests-grafana-port-forward:
@echo "Port forwarding Grafana for troubleshooting e2e tests"
@echo "Visit http://localhost:3080/explore to access Grafana"
kubectl port-forward -n traces svc/grafana 3080:80

# Use this for debug to add a destination which only prints samples of telemetry items to the cluster gateway collector logs
.PHONY: dev-debug-destination
dev-debug-destination:
Expand Down
2 changes: 1 addition & 1 deletion agents/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# index_url = 'http://host.docker.internal:8081/packages/odigos_opentelemetry_python-0.1.1-py3-none-any.whl'

install_requires = [
f"odigos-opentelemetry-python @ {index_url}" if index_url else "odigos-opentelemetry-python==1.0.25"
f"odigos-opentelemetry-python @ {index_url}" if index_url else "odigos-opentelemetry-python==1.0.26"
]

setup(
Expand Down
62 changes: 62 additions & 0 deletions api/config/crd/bases/odigos.io_instrumentationconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,60 @@ spec:
Config for the OpenTelemeetry SDKs that should be applied to a workload.
The workload is identified by the owner reference
properties:
agentInjectionEnabled:
description: determines if odigos should inject agents to pods of
this workload.
type: boolean
containers:
description: configuration for each instrumented container in the
workload
items:
description: ContainerAgentConfig is a configuration for a specific
container in a workload.
properties:
agentEnabled:
description: boolean flag to indicate if the agent should be
enabled for this container.
type: boolean
agentEnabledMessage:
description: |-
free text message to provide more information about the instrumentation decision.
can be left empty if reason is self-explanatory.
type: string
agentEnabledReason:
description: An enum reason for the agent injection decision.
enum:
- EnabledSuccessfully
- WaitingForRuntimeInspection
- WaitingForNodeCollector
- UnsupportedProgrammingLanguage
- IgnoredContainer
- NoAvailableAgent
- UnsupportedRuntimeVersion
- MissingDistroParameter
- OtherAgentDetected
type: string
containerName:
description: The name of the container to which this configuration
applies.
type: string
distroParams:
additionalProperties:
type: string
description: |-
Additional parameters to the distro that controls how it's being applied.
Keys are parameter names (like "libc") and values are the value to use for that parameter (glibc / musl)
type: object
otelDistroName:
description: |-
The name of the otel distribution to use for this container.
if the name is empty, this container should not be instrumented.
type: string
required:
- agentEnabled
- containerName
type: object
type: array
sdkConfigs:
description: |-
Configuration for the OpenTelemetry SDKs that this workload should use.
Expand Down Expand Up @@ -419,6 +473,8 @@ spec:
description: the service.name property is used to populate the `service.name`
resource attribute in the telemetry generated by this workload
type: string
required:
- agentInjectionEnabled
type: object
status:
properties:
Expand Down Expand Up @@ -553,6 +609,12 @@ spec:
- language
type: object
type: array
workloadRolloutHash:
description: |-
The hash used to determine whether the associated workload needs to be rolled out.
This hash is calculated based on the containers config array and takes into account the
container name, Instrumented flag and the OTel distro name.
type: string
type: object
type: object
served: true
Expand Down
19 changes: 15 additions & 4 deletions api/config/crd/bases/odigos.io_instrumentationrules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,22 @@ spec:
regarding the rule for convenience. For example: why it was added.
Odigos does not use or assume any meaning from this field.'
type: string
otelDistros:
description: Set the otel distros to use instead of the defaults.
properties:
otelDistroNames:
description: |-
Set a list of distribution names that take priority over the default distributions.
if a language is not in this list, the default distribution will be used.
if multiple distributions are specified for the same language, in one or many rules, the behavior is undefined.
items:
type: string
type: array
required:
- otelDistroNames
type: object
otelSdks:
description: |-
Set the OtelSdk to use for the workloads in this rule.
instrumentation libraries will be ignored if set.
the rule will be used only for languages which are specified, and ignored otherwise.
description: 'Deprecated: use OtelDistros instead.'
properties:
otelSdkByLanguage:
additionalProperties:
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions api/generated/odigos/applyconfiguration/utils.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ require (
golang.org/x/time v0.7.0 // indirect
golang.org/x/tools v0.28.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/protobuf v1.36.3 // indirect
google.golang.org/protobuf v1.36.4 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.32.0
Expand Down
Loading

0 comments on commit b4c4de1

Please sign in to comment.