【问题标题】:Handling 401 Unauthorised response code in OTEL collector在 OTEL 收集器中处理 401 Unauthorized 响应代码
【发布时间】:2023-02-15 18:39:13
【问题描述】:

处理来自 prometheusremotewrite 的 401 未经授权响应的正确方法是什么?

当 OTEL 收集器从 prometheusremotewrite URL 收到 401 响应代码时,我想运行自定义代码以从 http 端点获取最新的授权凭据。据我所见,没有任何钩子可以做到这一点?我想避免为了编写这段代码而克隆当前导出器。

【问题讨论】:

  • 这听起来像 OIDC。我对吗?
  • 这些更像是基本的身份验证凭证(用户名、密码)

标签: open-telemetry


【解决方案1】:

OTEL collector 有认证接口https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configauth/README.md

已经有基本的身份验证扩展 - https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/basicauthextension 我只会为您的需要编写扩展,我不会分叉出口商。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-18
    • 2011-03-18
    • 1970-01-01
    • 1970-01-01
    • 2020-04-28
    相关资源
    最近更新 更多