Skip to content

Commit

Permalink
Expose reportError and trace in the API
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitrii Tkach committed Jan 22, 2025
1 parent fc4e37d commit ff10007
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions packages/rtckit/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/rtckit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gcorevideo/rtckit",
"version": "0.84.0",
"version": "0.85.0",
"private": false,
"description": "A WebRTC client for Gcore Streaming Platform",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/rtckit/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export * from "./stats/WebrtcReporter.js";
export * from "./stats/types.js";
export { LogTracer } from "./trace/LogTracer.js";
export { SentryTracer } from "./trace/SentryTracer.js";
export { setTracer } from "./trace/index.js";
export { reportError, setTracer, trace } from "./trace/index.js";
export * from "./trace/types.js";
export * from "./types.js";
export * from "./userMedia/types.js";
Expand Down
10 changes: 5 additions & 5 deletions packages/rtckit/src/trace/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ export function setTracer(t: Tracer) {
}

/**
* @internal
* @param e
* @public
* @param e - error to report
*/
export function reportError(e: unknown) {
tracer.reportError(e);
}

/**
* @internal
* @param msg
* @param data
* @public
* @param msg - message to attach to the trace
* @param data - additional attributes to attach to the trace message
*/
export function trace(msg: string, data: Record<string, unknown> = {}) {
tracer.trace(msg, data);
Expand Down

0 comments on commit ff10007

Please sign in to comment.