dt-app
Version:
The Dynatrace App Toolkit is a tool you can use from your command line to create, develop, and deploy apps on your Dynatrace environment.
48 lines (47 loc) • 2.21 kB
TypeScript
import type { Action, Session } from '@dynatrace/openkit-js';
import type { AppDevUsageReport } from '../reporting/appdev-reporting';
import type { OptionValues } from 'commander';
import type { CliOptions, ResolvedCliOptions } from '../config/cli-options';
import type { TelemetryBizEvent } from './reporting-utils';
export declare const LOGGER_SCOPE = "TELEMETRY";
export declare let session: Session;
/**
* Checks if telemetry is disabled.
* @returns true if telemetry is disabled, false otherwise
*/
export declare function isTelemetryDisabled(): boolean;
/** Initialize dt-app telemetry */
export declare function initializeTelemetry(options?: Partial<ResolvedCliOptions>): Promise<void>;
/** Generates a root action for the currently run command. */
export declare function generateOpenKitAction(actionName: string): Promise<Action | undefined>;
export type AdvancedActionDetails = {
appId: string;
appVersion: string;
environmentUrl: string;
oauth2File: string;
selfMonitoringAgent?: string;
};
/**
* Add additional information which should be reported for a specific action
* @param action The action to which to append the information
* @param details The details which should be reported
*/
export declare function reportAdditionalActionDetails(action: Action | undefined, details: AdvancedActionDetails, command?: string): Promise<void>;
/**
* Report the parameters of a cli command to the telemetry.
* @param action The action to which to append the information.
* @param args The call parameters
*/
export declare function reportCommandArgs(action: Action | undefined, args: OptionValues): Promise<void>;
/**
* Send VS Code Telemetry BizEvents
* @param bizEvent The BizEvent to send
*/
export declare function sendTelemetryBizEvent(bizEvent: TelemetryBizEvent, options?: Partial<CliOptions>): void;
/** Generates a design system action and sends app report as bizevent. */
export declare function generateOpenKitDsAction(actionName: string, appReport: AppDevUsageReport): Promise<Action | undefined>;
/**
* Closes the OpenKit connection.
* Needs to be called for the process to actually exit.
*/
export declare function closeOpenkitConnection(): Promise<void>;