Skip to content

Commit

Permalink
Upgrade dotnet and nodejs autoinstr versions
Browse files Browse the repository at this point in the history
  • Loading branch information
rnishtala-sumo committed Feb 3, 2025
1 parent 03477e6 commit ed8502f
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 11 deletions.
4 changes: 2 additions & 2 deletions deploy/helm/sumologic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ The following table lists the configurable parameters of the Sumo Logic chart an
| `instrumentation.createDefaultInstrumentation` | Flag to control creation of default Instrumentation object | `false` |
| `instrumentation.dotnet.extraEnvVars` | Additional environment variables for OpenTelemetry Operator Instrumentation Resource. | `{}` |
| `opentelemetry-operator.manager.autoInstrumentationImage.dotnet.repository` | OpenTelemetry Operator DotNet Instrumentation iamfge repository. | `public.ecr.aws/sumologic/autoinstrumentation-dotnet` |
| `opentelemetry-operator.manager.autoInstrumentationImage.dotnet.tag` | OpenTelemetry Operator DotNet Instrumentation image tag. | `0.7.0` |
| `opentelemetry-operator.manager.autoInstrumentationImage.dotnet.tag` | OpenTelemetry Operator DotNet Instrumentation image tag. | `1.9.0` |
| `instrumentation.dotnet.metrics.enabled` | Flag to control metrics export from DotNet instrumentation in `Instrumentation` resource. | `true` |
| `instrumentation.dotnet.traces.enabled` | Flag to control traces export from DotNet instrumentation in `Instrumentation` resource. | `true` |
| `instrumentation.java.extraEnvVars` | Additional environment variables for OpenTelemetry Operator Instrumentation Resource. | `{}` |
Expand All @@ -320,7 +320,7 @@ The following table lists the configurable parameters of the Sumo Logic chart an
| `instrumentation.nodejs.metrics.enabled` | Flag to control metrics export from NodeJS instrumentation in `Instrumentation` resource. | `true` |
| `instrumentation.nodejs.extraEnvVars` | Additional environment variables for OpenTelemetry Operator Instrumentation Resource. | `{}` |
| `opentelemetry-operator.manager.autoInstrumentationImage.nodejs.repository` | OpenTelemetry Operator NodeJS Instrumentation image repository. | `public.ecr.aws/sumologic/autoinstrumentation-nodejs` |
| `opentelemetry-operator.manager.autoInstrumentationImage.nodejs.tag` | OpenTelemetry Operator NodeJS Instrumentation image tag. | `0.40.0` |
| `opentelemetry-operator.manager.autoInstrumentationImage.nodejs.tag` | OpenTelemetry Operator NodeJS Instrumentation image tag. | `0.54.0` |
| `opentelemetry-operator.manager.image.repository` | The default operator image repository for OpenTelemetry. | `public.ecr.aws/sumologic/opentelemetry-operator` |
| `opentelemetry-operator.manager.collectorImage.repository` | The default collector image repository for OpenTelemetryCollector CRDs. | `public.ecr.aws/sumologic/sumologic-otel-collector` |
| `opentelemetry-operator.manager.collectorImage.tag` | The default collector image tag for OpenTelemetryCollector CRDs. | `0.114.0-sumo-0` |
Expand Down
4 changes: 2 additions & 2 deletions deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2498,13 +2498,13 @@ opentelemetry-operator:
tag: 2.10.0
dotnet:
repository: public.ecr.aws/sumologic/autoinstrumentation-dotnet
tag: 0.7.0
tag: 1.9.0
python:
repository: public.ecr.aws/sumologic/autoinstrumentation-python
tag: 0.48b0
nodejs:
repository: public.ecr.aws/sumologic/autoinstrumentation-nodejs
tag: 0.40.0
tag: 0.54.0
env:
{}
# ENABLE_WEBHOOKS: "true"
Expand Down
52 changes: 52 additions & 0 deletions tests/integration/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,58 @@ func GetCurlAppFeature() features.Feature {
internal.InstrumentationAppsNamespace,
internal.CurlAppImage,
)).
Assess("wait for dotnet traces", stepfuncs.WaitUntilExpectedSpansPresent(
1,
map[string]string{
"application": "test-apps",
"service.name": "dotnet-app",
"_collector": "kubernetes",
"http.request.method": "GET",
"http.response.status_code": "200",
"url.path": "/",
"k8s.cluster.name": "kubernetes",
"k8s.container.name": "dotnetapp",
"k8s.deployment.name": "dotnet-app",
"k8s.namespace.name": internal.InstrumentationAppsNamespace,
"k8s.pod.pod_name": "dotnet-app",
"k8s.pod.label.app": "dotnet-app",
"_sourceCategory": "kubernetes/test/apps/dotnet/app",
"_sourceName": fmt.Sprintf("%s.dotnet-app.dotnetapp", internal.InstrumentationAppsNamespace),
"telemetry.distro.version": "1.9.0",
"telemetry.sdk.language": "dotnet",
"telemetry.sdk.version": "1.9.0",
},
waitDuration,
tickDuration,
)).
Assess("wait for nodejs traces", stepfuncs.WaitUntilExpectedSpansPresent(
1,
map[string]string{
"application": "test-apps",
"service.name": "nodejs-app",
"_collector": "kubernetes",
"http.method": "GET",
"http.route": "/",
"http.status_code": "200",
"http.scheme": "http",
"http.target": "/",
"http.url": "http://nodejs-app-service.test-apps:8080/",
"k8s.cluster.name": "kubernetes",
"k8s.container.name": "nodejsapp",
"k8s.deployment.name": "nodejs-app",
"k8s.namespace.name": internal.InstrumentationAppsNamespace,
"k8s.pod.pod_name": "nodejs-app",
"k8s.pod.label.app": "nodejs-app",
"net.host.port": "3000",
"_sourceCategory": "kubernetes/test/apps/nodejs/app",
"_sourceName": fmt.Sprintf("%s.nodejs-app.nodejsapp", internal.InstrumentationAppsNamespace),
"telemetry.sdk.language": "nodejs",
"telemetry.sdk.name": "opentelemetry",
"telemetry.sdk.version": "1.27.0",
},
waitDuration,
tickDuration,
)).
Assess("wait for java traces", stepfuncs.WaitUntilExpectedSpansPresent(
1,
map[string]string{
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/helm_opentelemetry_operator_instr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ func Test_OpenTelemetry_Operator_Instrumentation(t *testing.T) {
}).
Feature()

// featDotnetApp := GetDotnetAppFeature()
featDotnetApp := GetDotnetAppFeature()
featJavaApp := GetJavaAppFeature()
// featNodeJSApp := GetNodeJSAppFeature()
// featPythonApp := GetPythonAppFeature()
featNodeJSApp := GetNodeJSAppFeature()
featPythonApp := GetPythonAppFeature()

curlApp := GetCurlAppFeature()

testenv.Test(t, featInstall, featOpenTelemetryOperator, featJavaApp, curlApp)
testenv.Test(t, featInstall, featOpenTelemetryOperator, featDotnetApp, featJavaApp, featNodeJSApp, featPythonApp, curlApp)
}
21 changes: 18 additions & 3 deletions tests/integration/internal/sumologicmock/receiver_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ func (client *SumologicMockClient) GetSpansCount(t *testing.T, metadataFilters M
}

url := client.baseUrl.ResolveReference(path)
fmt.Println("================Test Name================")
fmt.Println(t.Name())
fmt.Println("================URL================")
resp, err := http.Get(url.String())
if err != nil {
return 0, fmt.Errorf("failed fetching %s, err: %w", url, err)
Expand All @@ -195,14 +197,22 @@ func (client *SumologicMockClient) GetSpansCount(t *testing.T, metadataFilters M
return 0, fmt.Errorf("failed reading response body: %w", err)
}
bodyString := string(body)
fmt.Println("================Response (No filters)================")
fmt.Println(bodyString)
url.RawQuery = queryParams.Encode()

fmt.Println("================URL With Filters================")
fmt.Println(url.String())
resp, err = http.Get(url.String())
if err != nil {
return 0, fmt.Errorf("failed fetching %s, err: %w", url, err)
}

body, err = io.ReadAll(resp.Body)
if err != nil {
return 0, fmt.Errorf("failed reading response body: %w", err)
}
bodyString = string(body)
fmt.Println("================Response (With filters)================")
fmt.Println(bodyString)
if resp.StatusCode != 200 {
return 0, fmt.Errorf(
"received status code %d in response to receiver request at %q",
Expand All @@ -211,9 +221,14 @@ func (client *SumologicMockClient) GetSpansCount(t *testing.T, metadataFilters M
}

var spans []Span
if err := json.NewDecoder(resp.Body).Decode(&spans); err != nil {
if err := json.Unmarshal(body, &spans); err != nil {
return 0, err
}
/*if err := json.NewDecoder(resp.Body).Decode(&spans); err != nil {
return 0, err
}*/
fmt.Println("================Response================")
fmt.Println(spans)
return uint(len(spans)), nil
}

Expand Down

0 comments on commit ed8502f

Please sign in to comment.