Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some spelling errors #558

Merged
merged 1 commit into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ At a minimum, please provide:
- Android API level;
- Datadog SDK version;
- Versions of any other relevant dependencies (OkHttp, …);
- Your proguard configuration;
- Your ProGuard configuration;
- The list of Gradle plugins applied to your project.

If at all possible, also provide:
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/DdSdkReactNativeConfiguration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const DEFAULTS = {
*/
export class DdSdkReactNativeConfiguration {
/**
* Enables crash reporting for native plaforms (iOS, Android). Default `false`.
* Enables crash reporting for native platforms (iOS, Android). Default `false`.
*/
public nativeCrashReportEnabled: boolean =
DEFAULTS.nativeCrashReportEnabled;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/__tests__/mock.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const privateProperties = {
'nativeLogs',
'logEventMapper',
'printLogDroppedSdkNotInitialized',
'printlogDroppedByMapper',
'printLogDroppedByMapper',
'printLogTracked',
'log',
'logWithError'
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/logs/DdLogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class DdLogsWrapper implements DdLogsType {
}
};

private printlogDroppedByMapper = (
private printLogDroppedByMapper = (
message: string,
status: 'debug' | 'info' | 'warn' | 'error'
) => {
Expand Down Expand Up @@ -144,7 +144,7 @@ class DdLogsWrapper implements DdLogsType {
status
});
if (!event) {
this.printlogDroppedByMapper(message, status);
this.printLogDroppedByMapper(message, status);
return generateEmptyPromise();
}

Expand Down Expand Up @@ -180,7 +180,7 @@ class DdLogsWrapper implements DdLogsType {
status
});
if (!event) {
this.printlogDroppedByMapper(message, status);
this.printLogDroppedByMapper(message, status);
return generateEmptyPromise();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ export class DdRumUserInteractionTracking {

try {
const jsxRuntime = getJsxRuntime();
const originaljsx = jsxRuntime.jsx;
this.originalJsx = originaljsx;
const originalJsx = jsxRuntime.jsx;
this.originalJsx = originalJsx;
jsxRuntime.jsx = (
...args: Parameters<typeof React.createElement>
): ReturnType<typeof React.createElement> => {
return this.patchCreateElementFunction(originaljsx, args);
return this.patchCreateElementFunction(originalJsx, args);
};
} catch (e) {
DdSdk.telemetryDebug(getErrorMessage(e));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ interface XHRProxyProviders {
}

/**
* Proxies XMLHTTPRequest to track resources.
* Proxies XMLHttpRequest to track resources.
*/
export class XHRProxy extends RequestProxy {
private providers: XHRProxyProviders;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { SdkVerbosity } from '../../../../../SdkVerbosity';

const MISSING_RESOURCE_SIZE = -1;
export const RESOURCE_SIZE_ERROR_MESSAGE =
"Couldn't get resource size, because an error occured: ";
"Couldn't get resource size, because an error occurred: ";

function byteLength(str: string): number {
// This is a weird trick, but it works.
Expand Down
10 changes: 5 additions & 5 deletions packages/core/src/sdk/DatadogProvider/Buffer/BoundedBuffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class BoundedBuffer extends DatadogBuffer {
message: string;
stack: string;
kind: string;
occurences: number;
occurrences: number;
};
} = {};

Expand Down Expand Up @@ -184,22 +184,22 @@ export class BoundedBuffer extends DatadogBuffer {
kind: string
) => {
if (this.telemetryBuffer[kind]) {
this.telemetryBuffer[kind].occurences++;
this.telemetryBuffer[kind].occurrences++;
} else {
this.telemetryBuffer[kind] = {
message,
stack,
kind,
occurences: 1
occurrences: 1
};
}
};

private drainTelemetry = () => {
Object.values(this.telemetryBuffer).forEach(
({ message, stack, kind, occurences }) => {
({ message, stack, kind, occurrences }) => {
DdSdk.telemetryError(
`${message} happened ${occurences} times.`,
`${message} happened ${occurrences} times.`,
stack,
kind
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const isConfigurationPartial = (
return false;
}
if (configuration instanceof DdSdkReactNativeConfiguration) {
// Not using InternalLog here as it is not yet instanciated
// Not using InternalLog here as it is not yet instantiated
console.warn(
'A DdSdkReactNativeConfiguration was passed to DatadogProvider. Please use DatadogProviderConfiguration instead.'
);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/sdk/EventMappers/EventMapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export type AdditionalEventDataForMapper = {
*
* @param eventMapper the user-registered event mapper
* @param formatRawEventForMapper formatter that gets the raw event (from javascript call) and returns the input given to the mapper
* @param formatMapperEventForNative formatter that gets the ouput of the mapper, and returns the input given to the native SDKs
* @param formatMapperEventForNative formatter that gets the output of the mapper, and returns the input given to the native SDKs
* @param formatRawEventForNative called when no event mapper is registered
*/
export class EventMapper<RawEvent, MapperEvent, NativeEvent> {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/specs/NativeDdLogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export interface Spec extends TurboModule {
) => Promise<void>;

/**
* Send a log containing an error with INDO level.
* Send a log containing an error with INFO level.
* @param message: The message to send.
* @param errorKind: The error kind to send.
* @param errorMessage: The error message to send.
Expand Down
2 changes: 1 addition & 1 deletion packages/react-navigation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ yarn add @datadog/mobile-react-navigation

### Track view navigation

To track changes in navigation as RUM Views, set the `onready` callback of your `NavigationContainer` component as follow. You can use the optional `ViewNamePredicate` parameter to replace the automatically detected View name with something more relevant to your use case.
To track changes in navigation as RUM Views, set the `onReady` callback of your `NavigationContainer` component as follow. You can use the optional `ViewNamePredicate` parameter to replace the automatically detected View name with something more relevant to your use case.

Returning `null` in the `ViewNamePredicate` prevents the new RUM View from being created. The previous RUM View remains active.

Expand Down