Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add propagation_modes for the Lightstep Tracer #4179

Merged
merged 2 commits into from
Apr 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ Please see the [Envoy documentation](https://www.envoyproxy.io/docs/envoy/latest

- Security: Completely remove gdbm, pip, smtplib, and sqlite packages, as they are unused.

- Feature: It is now possible to set `propagation_modes` in the `TracingService` config when using
lightstep as the driver. (Thanks to <a href="https://github.com/psalaberria002">Paul</a>!) ([#4179])

[#4179]: https://github.com/emissary-ingress/emissary/pull/4179

## [2.2.1] February 22, 2022
[2.2.1]: https://github.com/emissary-ingress/emissary/compare/v2.2.0...v2.2.1

Expand Down
10 changes: 10 additions & 0 deletions docs/releaseNotes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ items:
type: security
body: >-
Completely remove gdbm, pip, smtplib, and sqlite packages, as they are unused.
- title: Allow setting propagation modes for Lightstep tracing
type: feature
body: >-
It is now possible to set <code>propagation_modes</code> in the
<code>TracingService</code> config when using lightstep as the driver.
(Thanks to <a href="https://github.com/psalaberria002">Paul</a>!)
github:
- title: "#4179"
link: https://github.com/emissary-ingress/emissary/pull/4179


- version: 2.2.1
date: '2022-02-22'
Expand Down
18 changes: 18 additions & 0 deletions manifests/emissary/emissary-crds.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -3696,6 +3696,15 @@ spec:
type: boolean
trace_id_128bit:
type: boolean
v3PropagationModes:
items:
enum:
- ENVOY
- LIGHTSTEP
- B3
- TRACE_CONTEXT
type: string
type: array
type: object
driver:
enum:
Expand Down Expand Up @@ -3773,6 +3782,15 @@ spec:
type: string
collector_hostname:
type: string
propagation_modes:
items:
enum:
- ENVOY
- LIGHTSTEP
- B3
- TRACE_CONTEXT
type: string
type: array
service_name:
type: string
shared_span_context:
Expand Down
18 changes: 18 additions & 0 deletions pkg/api/getambassador.io/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3755,6 +3755,15 @@ spec:
type: boolean
trace_id_128bit:
type: boolean
v3PropagationModes:
items:
enum:
- ENVOY
- LIGHTSTEP
- B3
- TRACE_CONTEXT
type: string
type: array
type: object
driver:
enum:
Expand Down Expand Up @@ -3831,6 +3840,15 @@ spec:
type: string
collector_hostname:
type: string
propagation_modes:
items:
enum:
- ENVOY
- LIGHTSTEP
- B3
- TRACE_CONTEXT
type: string
type: array
service_name:
type: string
shared_span_context:
Expand Down
4 changes: 4 additions & 0 deletions pkg/api/getambassador.io/v2/crd_tracingservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
package v2

import (
"github.com/datawire/ambassador/v2/pkg/api/getambassador.io/v3alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand All @@ -39,6 +40,9 @@ type TraceConfig struct {
TraceID128Bit *bool `json:"trace_id_128bit,omitempty"`
SharedSpanContext *bool `json:"shared_span_context,omitempty"`
ServiceName string `json:"service_name,omitempty"`

// +k8s:conversion-gen:rename=PropagationModes
V3PropagationModes []v3alpha1.PropagationMode `json:"v3PropagationModes,omitempty"`
}

// TracingServiceSpec defines the desired state of TracingService
Expand Down
74 changes: 72 additions & 2 deletions pkg/api/getambassador.io/v2/zz_generated.conversion.go

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

6 changes: 6 additions & 0 deletions pkg/api/getambassador.io/v2/zz_generated.deepcopy.go

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

14 changes: 9 additions & 5 deletions pkg/api/getambassador.io/v3alpha1/crd_tracingservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,20 @@ type TraceSampling struct {
Overall *int `json:"overall,omitempty"`
}

// +kubebuilder:validation:Enum=ENVOY;LIGHTSTEP;B3;TRACE_CONTEXT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I know some of the existing enums don't follow this, but I believe k8s style is to use PascalCase.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type PropagationMode string

type TraceConfig struct {
AccessTokenFile string `json:"access_token_file,omitempty"`
CollectorCluster string `json:"collector_cluster,omitempty"`
CollectorEndpoint string `json:"collector_endpoint,omitempty"`
// +kubebuilder:validation:Enum=HTTP_JSON_V1;HTTP_JSON;HTTP_PROTO
CollectorEndpointVersion string `json:"collector_endpoint_version,omitempty"`
CollectorHostname string `json:"collector_hostname,omitempty"`
TraceID128Bit *bool `json:"trace_id_128bit,omitempty"`
SharedSpanContext *bool `json:"shared_span_context,omitempty"`
ServiceName string `json:"service_name,omitempty"`
CollectorEndpointVersion string `json:"collector_endpoint_version,omitempty"`
CollectorHostname string `json:"collector_hostname,omitempty"`
PropagationModes []PropagationMode `json:"propagation_modes,omitempty"`
TraceID128Bit *bool `json:"trace_id_128bit,omitempty"`
SharedSpanContext *bool `json:"shared_span_context,omitempty"`
ServiceName string `json:"service_name,omitempty"`
}

// TracingServiceSpec defines the desired state of TracingService
Expand Down
5 changes: 5 additions & 0 deletions pkg/api/getambassador.io/v3alpha1/zz_generated.deepcopy.go

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

18 changes: 18 additions & 0 deletions python/tests/integration/manifests/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3605,6 +3605,15 @@ spec:
type: boolean
trace_id_128bit:
type: boolean
v3PropagationModes:
items:
enum:
- ENVOY
- LIGHTSTEP
- B3
- TRACE_CONTEXT
type: string
type: array
type: object
driver:
enum:
Expand Down Expand Up @@ -3682,6 +3691,15 @@ spec:
type: string
collector_hostname:
type: string
propagation_modes:
items:
enum:
- ENVOY
- LIGHTSTEP
- B3
- TRACE_CONTEXT
type: string
type: array
service_name:
type: string
shared_span_context:
Expand Down
Loading