Skip to content

Conversation

@liustve
Copy link
Contributor

@liustve liustve commented May 12, 2025

Background:
#358
The above PR got rid of OtlpAwsSpanExporter and OtlpAwsLogExporter as to use the default upstream exporters as that was a cleaner approach.

However, we need the OtlpAwsSpanExporter and OtlpAwsLogExporter classes to support later requirements for Gen AI as we need to override the export method.

Description of changes:
This PR reintroduces the OtlpAwsSpanExporter and OtlpAwsLogExporter classes to support later requirements for Gen AI as we need to override the export method.

This change does not introduce anything new and the Sigv4 span + logs exporter still work as intended:

Logs:

{
    "resource": {
        "attributes": {
            "aws.local.service": "test",
            "service.name": "test",
            "cloud.region": "us-west-2",
            "host.type": "c5.4xlarge",
            "cloud.availability_zone": "us-west-2c",
            "telemetry.sdk.name": "opentelemetry",
            "telemetry.sdk.language": "python",
            "cloud.provider": "aws",
            "cloud.account.id": "571600841604",
            "telemetry.sdk.version": "1.27.0",
            "host.name": "ip-172-31-7-29.us-west-2.compute.internal",
            "cloud.platform": "aws_ec2",
            "host.id": "i-0b04d6affbae7d629",
            "telemetry.auto.version": "0.9.0.dev0-aws"
        }
    },
    "scope": {
        "name": "opentelemetry.sdk._logs._internal"
    },
    "timeUnixNano": 1747074906326769664,
    "observedTimeUnixNano": 1747074906326822815,
    "severityNumber": 9,
    "severityText": "INFO",
    "body": "127.0.0.1 - - [12/May/2025 18:35:06] \"GET /server_request HTTP/1.1\" 200 -",
    "attributes": {
        "code.filepath": "/home/ec2-user/.local/lib/python3.9/site-packages/werkzeug/_internal.py",
        "otelTraceSampled": false,
        "code.function": "_log",
        "code.lineno": 97,
        "otelTraceID": "0",
        "otelSpanID": "0",
        "otelServiceName": "test"
    },
    "traceId": "",
    "spanId": ""
}

Spans:




{
    "resource": {
        "attributes": {
            "aws.local.service": "test",
            "service.name": "test",
            "cloud.region": "us-west-2",
            "host.type": "c5.4xlarge",
            "cloud.availability_zone": "us-west-2c",
            "telemetry.sdk.name": "opentelemetry",
            "telemetry.sdk.language": "python",
            "cloud.provider": "aws",
            "cloud.account.id": "571600841604",
            "telemetry.sdk.version": "1.27.0",
            "host.name": "ip-172-31-7-29.us-west-2.compute.internal",
            "cloud.platform": "aws_ec2",
            "host.id": "i-0b04d6affbae7d629",
            "telemetry.auto.version": "0.9.0.dev0-aws"
        }
    },
    "scope": {
        "name": "opentelemetry.instrumentation.flask",
        "version": "0.48b0"
    },
    "traceId": "68223f2d375733237e24512171012437",
    "spanId": "34dd5a89d7a21fdf",
    "flags": 256,
    "name": "GET /",
    "kind": "SERVER",
    "startTimeUnixNano": 1747074861988123056,
    "endTimeUnixNano": 1747074861988911516,
    "durationNano": 788460,
    "attributes": {
        "net.host.name": "localhost:8082",
        "aws.local.service": "test",
        "net.peer.port": 57356,
        "telemetry.extended": "true",
        "http.target": "/",
        "http.flavor": "1.1",
        "net.peer.ip": "127.0.0.1",
        "http.host": "localhost:8082",
        "aws.local.environment": "ec2:default",
        "http.status_code": 404,
        "aws.local.operation": "GET /",
        "aws.span.kind": "LOCAL_ROOT",
        "http.server_name": "127.0.0.1",
        "http.user_agent": "curl/8.5.0",
        "net.host.port": 8082,
        "PlatformType": "AWS::EC2",
        "http.method": "GET",
        "http.response.status_code": 404,
        "http.scheme": "http"
    },
    "status": {
        "code": "UNSET"
    }
}

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@liustve liustve requested a review from a team as a code owner May 12, 2025 18:36
@liustve liustve requested review from mxiamxia, srprash and yiyuan-he May 12, 2025 18:37
@liustve liustve merged commit b6b7cf8 into aws-observability:main May 12, 2025
12 checks passed
@liustve liustve deleted the sigv4_logs_p2 branch May 12, 2025 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants