Custom routes via server.extend() can't emit WideEvents / telemetry (logger not exported)

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

Maintainer thường phản hồi trong vòng 3 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Lĩnh vực
api, backend, observability

Hướng nghiên cứu

Bắt đầu với entry point server.extend() được sử dụng từ onPluginsReady và xem xét logging/logger.js cùng với exports map của package. So sánh cách sử dụng WideEvent nội bộ hiện có với các export công khai của @databricks/appkit và beta. Công việc được xem là hoàn tất khi các route tùy chỉnh có một cách được tài liệu hóa hoặc được hỗ trợ để phát telemetry có cấu trúc theo từng request, với ranh giới API công khai và hành vi mong đợi được làm rõ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Summary

Custom Express routes added via createApp({ onPluginsReady(appkit){ appkit.server.extend(app => …) } }) can't emit AppKit WideEvents / structured telemetry. Built-in plugin routes (analytics, files, genie) emit per-request WideEvents to the configured OTLP exporter, but custom routes have no supported way to do the same. console.log from a custom route reaches stdout but isn't part of the OTLP WideEvent/log export.

Version

@databricks/appkit 0.38.1 · Node 24 · Databricks Apps · telemetry configured via OTLP.

What I'm doing

Mounting custom HTTP routes (an MCP server over Streamable HTTP, plus a model-serving proxy) via server.extend() in onPluginsReady, and wanting per-request/per-tool observability alongside the plugin routes.

What I tried

Plugin routes use an internal logger:

import { createLogger } from ".../logging/logger.js";
const logger = createLogger("analytics");
logger.event(req)?.setComponent("analytics", "executeQuery").setContext("analytics", {...});

But that API isn't publicly reachable: createLogger / the WideEvent API is not exported from @databricks/appkit or @databricks/appkit/beta, and the package exports map (only ., ./beta, ./dist/shared/src/plugin, ./type-generator, ./package.json) blocks importing @databricks/appkit/dist/logging/logger.js.

Ask (any one)
  1. Export the WideEvent logger (createLogger + event/setComponent/setContext) as public API, or
  2. Document a supported way to emit WideEvents / structured telemetry from server.extend() routes, or
  3. Auto-instrument custom routes registered via server.extend().
Workaround

console.log (stdout only), or emitting a raw OTLP LogRecord via @opentelemetry/api-logs against the exporter AppKit already configures.

Ngôn ngữ chính
TypeScript
Star
119
Fork
36
Merge trung bình
4 ngày 16 giờ
Pull request đã merge (30 ngày)
37

Chuẩn bị môi trường

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 databricks/appkit

Tất cả issue của databricks/appkit

Issue tương tự

Thêm issue về TypeScript

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.