Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
0c1c0b3
chore(cli): telemetry client
kaizencc Jun 9, 2025
2fe74df
docs
kaizencc Jun 9, 2025
c6bf5f4
wip
kaizencc Jun 13, 2025
e91e7e3
use interfaces and fix tests
kaizencc Jun 13, 2025
0d33ac5
add schema and pr feedback
kaizencc Jun 16, 2025
c380240
Merge branch 'main' into conroy/basic-telemetry-client
kaizencc Jun 18, 2025
e51d30d
change to parsed url
kaizencc Jun 18, 2025
9d980d5
readonly
kaizencc Jun 18, 2025
9126147
Merge branch 'main' into conroy/basic-telemetry-client
kaizencc Jun 19, 2025
ab560fd
small change
kaizencc Jun 19, 2025
4e361ae
retries implemented, not yet tested
kaizencc Jun 19, 2025
69e63cd
add commented out test
kaizencc Jun 19, 2025
8760b44
Merge branch 'main' into conroy/basic-telemetry-client
kaizencc Jun 21, 2025
3dbbe62
add proxy support, better retries, test succeeds
kaizencc Jun 25, 2025
feaf376
lint
kaizencc Jun 25, 2025
83ebd08
lints
kaizencc Jun 25, 2025
56f23e5
force not ci in tests
kaizencc Jun 26, 2025
079bbc5
Merge branch 'main' into conroy/basic-telemetry-client
kaizencc Jun 26, 2025
635d6b7
Merge branch 'main' into conroy/basic-telemetry-client
kaizencc Jun 30, 2025
18d9349
Merge branch 'main' into conroy/basic-telemetry-client
kaizencc Jul 1, 2025
ea4720c
Merge branch 'main' into conroy/basic-telemetry-client
kaizencc Jul 2, 2025
4bf3be9
Merge branch 'main' into conroy/basic-telemetry-client
kaizencc Jul 2, 2025
359a442
telemetry interface includes flush
kaizencc Jul 2, 2025
54109d6
rename
kaizencc Jul 2, 2025
334b9dd
lint
kaizencc Jul 2, 2025
25dec4a
pr feedback
kaizencc Jul 2, 2025
5628ed9
trace
kaizencc Jul 2, 2025
cc8c6dd
pr feedback
kaizencc Jul 2, 2025
c7d365a
renames
kaizencc Jul 3, 2025
ab8bc32
fix tests
kaizencc Jul 3, 2025
0365976
remove url file
kaizencc Jul 3, 2025
8fdd0e9
add test on errors
kaizencc Jul 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
renames
  • Loading branch information
kaizencc committed Jul 3, 2025
commit c7d365a5295c334d4a72eefb4bb077799c8df02d
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const REQUEST_ATTEMPT_TIMEOUT_MS = 500;
/**
* Properties for the Endpoint Telemetry Client
*/
export interface EndpointTelemetryClientProps {
export interface EndpointTelemetrySinkProps {
/**
* The external endpoint to hit
*/
Expand All @@ -37,13 +37,13 @@ export interface EndpointTelemetryClientProps {
/**
* The telemetry client that hits an external endpoint.
*/
export class EndpointTelemetryClient implements ITelemetrySink {
export class EndpointTelemetrySink implements ITelemetrySink {
private events: TelemetrySchema[] = [];
private endpoint: UrlWithStringQuery;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should accept a string and parse internally. It would avoid exposing nodejs types in the props interface. Also - external callers are not the ones who want to parse, its this class that needs it, so it should do it.

private ioHelper: IoHelper;
private agent?: Agent;

public constructor(props: EndpointTelemetryClientProps) {
public constructor(props: EndpointTelemetrySinkProps) {
this.endpoint = props.endpoint;
this.ioHelper = IoHelper.fromActionAwareIoHost(props.ioHost);
this.agent = props.agent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { IoHelper } from '../../api-private';
/**
* Properties for the FileTelemetryClient
*/
export interface FileTelemetryClientProps {
export interface FileTelemetrySinkProps {
/**
* Where messages are going to be sent
*/
Expand All @@ -23,14 +23,14 @@ export interface FileTelemetryClientProps {
/**
* A telemetry client that collects events writes them to a file
*/
export class FileTelemetryClient implements ITelemetrySink {
export class FileTelemetrySink implements ITelemetrySink {
private ioHelper: IoHelper;
private logFilePath: string;

/**
* Create a new FileTelemetryClient
*/
constructor(props: FileTelemetryClientProps) {
constructor(props: FileTelemetrySinkProps) {
this.ioHelper = IoHelper.fromActionAwareIoHost(props.ioHost);
this.logFilePath = props.logFilePath;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { IoHelper } from '../../api-private';
/**
* Properties for the StdoutTelemetryClient
*/
export interface IoHostTelemetryClientProps {
export interface IoHostTelemetrySinkProps {
/**
* Where messages are going to be sent
*/
Expand All @@ -16,13 +16,13 @@ export interface IoHostTelemetryClientProps {
/**
* A telemetry client that collects events and flushes them to stdout.
*/
export class IoHostTelemetryClient implements ITelemetrySink {
export class IoHostTelemetrySink implements ITelemetrySink {
private ioHelper: IoHelper;

/**
* Create a new StdoutTelemetryClient
*/
constructor(props: IoHostTelemetryClientProps) {
constructor(props: IoHostTelemetrySinkProps) {
this.ioHelper = IoHelper.fromActionAwareIoHost(props.ioHost);
}

Expand Down
Loading