User_id column empty in Application Insights logs
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- azure, java, spring-boot
- Lĩnh vực
- backend, observability
Hướng nghiên cứu
So sánh thiết lập 2.6.4 Spring Boot starter/logback với thiết lập 3.7.2 web/runtime-attach, bắt đầu từ ApplicationInsights.attach(), SpringApplication.run() và user-id setter của RequestTelemetryContext được nêu trong issue. Xác minh cách user_id được truyền vào các trace so với giao dịch end-to-end, sau đó ghi lại cấu hình hoặc thay đổi được hỗ trợ để khôi phục nó trong trace logs.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hello,
I inherited a Spring boot application, which uses Application Insights.
Originally, the following maven packages were used:
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>applicationinsights-spring-boot-starter</artifactId>
<version>2.6.4</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>applicationinsights-logging-logback</artifactId>
<version>2.6.4</version>
</dependency>
The user_id was set as follows:
RequestTelemetry requestTelemetry = ThreadContext.getRequestTelemetryContext().getHttpRequestTelemetry();
requestTelemetry.getContext().getUser().setId(email);
Using the setup above, I was able to check traces in the logs, and filter on user (user_id column):
I've since upgraded to the 3.X SDK, using the following:
- Maven packages:
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>applicationinsights-web</artifactId>
<version>3.7.2</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>applicationinsights-runtime-attach</artifactId>
<version>3.7.2</version>
</dependency>
- Initialize telemetry:
public static void main(String[] args) {
ApplicationInsights.attach();
SpringApplication.run(MsPlanningApplication.class, args);
}
- Set user id:
RequestTelemetryContext requestTelemetryContext = ThreadContext.getRequestTelemetryContext();
if (requestTelemetryContext != null) {
RequestTelemetry requestTelemetry = requestTelemetryContext.getHttpRequestTelemetry();
requestTelemetry.getContext().getUser().setId(email);
}
However, since the upgrade to SDK 3.X, the user_id column is empty (the messages/errors are logged just fine). When I check the end-to-end transaction, I do see my user_id.
So, why am I not seeing the user_id in my traces (when checking the logs)?
- Ngôn ngữ chính
- Java
- Star
- 326
- Fork
- 223
- Merge trung bình
- 1 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 15
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/ApplicationInsights-Java
-
Java 25 native-access warning from bundled Netty requires broad ALL-UNNAMED permissionCó thể đã có người làm @rajkumar-rangaraj đã nhận 23 ngày trước. Đang mở
microsoft/ApplicationInsights-Java#4851 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
microsoft/ApplicationInsights-Java#4770 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Support for tail based sampling?Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
microsoft/ApplicationInsights-Java#4769 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
microsoft/ApplicationInsights-Java#4729 · 138 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
microsoft/ApplicationInsights-Java#4712 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/ApplicationInsights-Java
Issue tương tự
-
[BUG] 订单:会员凭订单号即可取消其他会员的待付款订单(取消接口不校验订单归属)Có thể đã có người làm @dadiyang đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
macrozheng/mall#1016 ·
-
[Bug] The producer summary counts an unreported client version as a second version and warns about a version mixCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
apache/rocketmq-dashboard#6110 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Feature:Resolution
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
intellij-elixir/intellij-elixir#4396 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Python 3.15 supportCó thể đã có người làm @amnesiaof đã nhận hôm nay. Đang mởL: python L: python:uv
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
dependabot/dependabot-core#16524 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`Processing lsp` never exits and leaves orphaned processesCó thể đã có người làm @overcast302 đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
processing/processing4#1578 · 1 bình luận ·