Allow connectionString to be overridden multiple times without restarting the AppInsights Agent
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- java, spring-boot
调研方向
先从 BytecodeUtilImpl.java 的第 70-73 行附近开始,了解为什么 ConnectionString.configure() 目前只执行一次,然后检查 InheritedConnectionStringSpanProcessor.java 的第 58-62 行附近以及链接的 connection string 覆盖文档。追踪 connection string 如何与 span 和 telemetry 目标关联。完成的要求是提出一种受支持的设计,使应用程序生命周期期间能够更改目标,或为不同的自定义 span 更改目标。
由索引模型根据 Issue 内容生成。
描述
Is your feature request related to a problem? Please describe.
As per your documentation, it's possible to override connection strings per each httpPathPrefix:
https://learn.microsoft.com/en-us/azure/azure-monitor/app/java-standalone-config#connection-string-overrides-preview
{
"preview": {
"connectionStringOverrides": [
{
"httpPathPrefix": "/myapp1",
"connectionString": "..."
},
{
"httpPathPrefix": "/myapp2",
"connectionString": "..."
}
]
}
}
This config is being processed in the following class of AppInsights Agent: InheritedConnectionStringSpanProcessor.java:L58-L62
I understand that this feature is geared towards a use-case where an app being instrumented with AppInsights is an MVC app, and a connectionStringOverride is applied at a Controller method level, where each Controller method has a different PathPrefix. I.e. this use-case is described in OpenTelemetryAPI documentation as creating a custom span per controller method:
https://opentelemetry.io/docs/instrumentation/java/manual/#create-spans
Describe the solution you would like
We are looking for a way to change connectionString multiple times throughout application lifecycle, not per httpPathPrefix
Ideally we would be able to run ConnectionString.configure() and change to a desired connectionString, and ApplicationInsight agent taking that into account, and posting metrics to a newly specified location.
com.microsoft.applicationinsights.connectionstring.ConnectionString.configure(CONNECTION_STRING)
Currently ConnectionString.configure(CONNECTION_STRING) can be run only once to set ConnectionString:
https://github.com/microsoft/ApplicationInsights-Java/blob/main/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/classicsdk/BytecodeUtilImpl.java#L70-L73
We need a way to determine custom OpenTelemetry spans, and have a different ConnectionString per each of these spans.
Describe alternatives you have considered
Describe any alternative solutions or features you've considered.
Additional context
Our app is not Spring MVC app that has different httpPathPrefix, but is rather a SpringBoot cron-executed org.springframework.boot.CommandLineRunner task, that runs periodically, and needs to send AppInsights telemetry to 3 different AppInsights containers.
- 主要语言
- Java
- 星标
- 326
- 派生
- 223
- 平均合并
- 23 小时 6 分钟
- 30 天内合并 PR
- 13
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/ApplicationInsights-Java 的其他 Issue
-
Java 25 native-access warning from bundled Netty requires broad ALL-UNNAMED permission可能已有人在做 @rajkumar-rangaraj 于 21 天前认领。 未关闭
microsoft/ApplicationInsights-Java#4851 · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 42/100
microsoft/ApplicationInsights-Java#4770 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 30/100
microsoft/ApplicationInsights-Java#4769 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
microsoft/ApplicationInsights-Java#4729 · 135 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 68/100
microsoft/ApplicationInsights-Java#4712 ·
维护者通常 1 天内回复
查看 microsoft/ApplicationInsights-Java 的全部 Issue
相似的 Issue
-
Mend: dependency security vulnerability
难度 2/5 1-3 小时 新手友好度 62/100
opfab/operatorfabric-core#10653 ·
维护者通常 1 天内回复
-
GeminiUtil placeholder user turn ("Continue output. DO NOT look at this line ...") is flagged by prompt injection filters可能已有人在做 @innoprej 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 78/100
salesforce/multicloudj#667 ·
维护者通常 1 天内回复
-
bug documentation
难度 2/5 1-3 小时 新手友好度 88/100
MetricsHub/winrm-java#202 ·
维护者通常 1 天内回复
-
ASCN/cBioPortal Pipelines/cBioPortal
难度 2/5 1-3 小时 新手友好度 64/100
mskcc/smile-server#1990 ·