Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Not all exceptions are populated with exception type and message

Đang mở
#3,739 10 bình luận 0 reaction 1 người được giao Xem trên GitHub

@heyams đang làm issue này rồi.

Từ ngày 9/7/2024.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Needs: Attention :wave:
Expected behavior

Span should contain exception type and message. More details: https://github.com/microsoft/ApplicationInsights-Java/pull/3148

Actual behavior

Exception type and message is not added in case exception is not propagated to main thread. Span will contain only exception field.

In other cases span contains exception.type and excpetion.message, without exception field.

Looks like inconsistent behavior which produces completely different fields.

To Reproduce

Code:

BlobServiceClient blobServiceClient = ...
BlobContainerClient blobContainerClient = blobServiceClient.getBlobContainerClient("blob-name");
blobContainerClient.exists();

Exception is not thrown to main thread, but rather caught inside blobContainerClient.exists().

Produced span:

2024-06-11 12:18:58.916+03:00 DEBUG c.m.a.a.i.exporter.AgentSpanExporter - exporting span: SpanData{
    spanContext=ImmutableSpanContext{traceId=REDACTED, spanId=REDACTED, traceFlags=01, traceState=ArrayBasedTraceState{entries=[]}, remote=false, valid=true}, 
    parentSpanContext=ImmutableSpanContext{traceId=REDACTED, spanId=REDACTED, traceFlags=01, traceState=ArrayBasedTraceState{entries=[]}, 
    remote=false, valid=true}, resource=Resource{schemaUrl=null, attributes={service.name="unknown_service:java", telemetry.sdk.language="java", telemetry.sdk.name="opentelemetry", telemetry.sdk.version="1.35.0"}}, 
    instrumentationScopeInfo=InstrumentationScopeInfo{name=azure-storage-blob, version=12.25.3, schemaUrl=https://opentelemetry.io/schemas/1.17.0, attributes={}}, 
    name=AzureBlobStorageCont.getProperties, kind=INTERNAL, startEpochNanos=1718097538120247437, endEpochNanos=1718097538844404395, 
    attributes=AttributesMap{data={az.namespace=Microsoft.Storage, thread.id=70, applicationinsights.internal.operation_name=REDACTED, thread.name=http-nio-8080-exec-1}, capacity=128, totalAddedValues=4}, 
    totalAttributeCount=4, events=[ImmutableExceptionEventData{epochNanos=1718097538844385117, exception=com.azure.storage.blob.models.BlobStorageException: Status code 404, "<?xml version="1.0" encoding="utf-8"?><Error><Code>ContainerNotFound</Code><Message>The specified container does not exist.

RequestId:REDACTED
Time:2024-06-11T09:18:58.7592080Z</Message></Error>", additionalAttributes={}, spanLimits=SpanLimitsValue{maxNumberOfAttributes=128, maxNumberOfEvents=128, maxNumberOfLinks=128, maxNumberOfAttributesPerEvent=128, maxNumberOfAttributesPerLink=128, maxAttributeValueLength=2147483647}}], totalRecordedEvents=1, links=[], totalRecordedLinks=0, status=ImmutableStatusData{statusCode=ERROR, description=}, hasEnded=true}
Ngôn ngữ chính
Java
Star
327
Fork
222
Merge trung bình
22 giờ 34 phút
Pull request đã merge (30 ngày)
14

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/ApplicationInsights-Java

Tất cả issue của microsoft/ApplicationInsights-Java

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.