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.
52 lines (51 loc) • 2.39 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 } from '../config/cli-options';
import type { TelemetryBizEvent } from './reporting-utils';
export declare const LOGGER_SCOPE = "TELEMETRY";
/**
* Determines whether telemetry should be enabled.
*/
export declare let disableTelemetry: boolean;
/**
* Sets the disableTelemetry variable
* It is necessary to set the disableTelemetry tag in this function because the config() method needs to be called first in the bin.ts so the .env file is loaded
*/
export declare function setDisableTelemetry(): void;
export declare let session: Session;
/** Initialize dt-app telemetry */
export declare function initializeTelemetry(options?: Partial<CliOptions>): 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>;