Skip to content

Commit

Permalink
Merge branch 'main' into hectorhdzg/logsinstr
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorhdzg authored Jan 31, 2024
2 parents abcf797 + 2df6310 commit 366d6e1
Show file tree
Hide file tree
Showing 24 changed files with 1,374 additions and 832 deletions.
3 changes: 1 addition & 2 deletions api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ All notable changes to this project will be documented in this file.
## Unreleased

* feat(api): add SugaredTracer for functions not defined in the spec

## Unreleased
* fix(api): fix unreachable @opentelemetry/api/experimental entry [#4446](https://github.com/open-telemetry/opentelemetry-js/pull/4446) @legendecas

## 1.7.0

Expand Down
8 changes: 4 additions & 4 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
"default": "./build/src/index.js"
},
"./experimental": {
"module": "./build/esm/experimental.js",
"esnext": "./build/esnext/experimental.js",
"types": "./build/src/experimental.d.ts",
"default": "./build/src/experimental.js"
"module": "./build/esm/experimental/index.js",
"esnext": "./build/esnext/experimental/index.js",
"types": "./build/src/experimental/index.d.ts",
"default": "./build/src/experimental/index.js"
}
},
"repository": "open-telemetry/opentelemetry-js",
Expand Down
23 changes: 20 additions & 3 deletions eslint.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ module.exports = {
"node",
"prettier"
],
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
extends: ["eslint:recommended", "plugin:prettier/recommended"],
parser: "@typescript-eslint/parser",
parserOptions: {
"project": "./tsconfig.json"
"project": null,
},
rules: {
"quotes": ["error", "single", { "avoidEscape": true }],
Expand All @@ -29,6 +29,11 @@ module.exports = {
overrides: [
{
files: ['*.ts'],
// Enable typescript-eslint for ts files.
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
parserOptions: {
"project": "./tsconfig.json"
},
rules: {
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-this-alias": "off",
Expand All @@ -50,21 +55,33 @@ module.exports = {
}
}],
"@typescript-eslint/no-shadow": ["warn"],
"prefer-rest-params": "off",
}
},
{
files: ["test/**/*.ts"],
// Enable typescript-eslint for ts files.
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
parserOptions: {
"project": "./tsconfig.json"
},
rules: {
"no-empty": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/ban-types": ["warn", {
"types": {
"Function": null,
}
}],
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-shadow": ["off"],
"@typescript-eslint/no-floating-promises": ["off"],
"@typescript-eslint/no-non-null-assertion": ["off"],
"@typescript-eslint/explicit-module-boundary-types": ["off"]
"@typescript-eslint/explicit-module-boundary-types": ["off"],
"prefer-rest-params": "off",
}
}
]
Expand Down
4 changes: 4 additions & 0 deletions experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ All notable changes to experimental packages in this project will be documented

### :bug: (Bug Fix)

* fix(sdk-node): allow using samplers when the exporter is defined in the environment [#4394](https://github.com/open-telemetry/opentelemetry-js/pull/4394) @JacksonWeber

### :books: (Refine Doc)

### :house: (Internal)

* refactor(instrumentation-grpc): clean up remnants of 'grpc' package instrumentation [#4420](https://github.com/open-telemetry/opentelemetry-js/pull/4420) @pichlermarc

## 0.48.0

### :boom: Breaking Change
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,30 @@ import type { EventEmitter } from 'events';
import type { Span, SpanStatus } from '@opentelemetry/api';
import type { Client, Metadata, ServiceError } from '@grpc/grpc-js';
import type * as grpcJs from '@grpc/grpc-js';
import type { GrpcJsInstrumentation } from './';
import type { GrpcClientFunc, SendUnaryDataCallback } from './types';
import type { metadataCaptureType } from '../internal-types';
import type { GrpcInstrumentation } from './';
import type {
GrpcClientFunc,
SendUnaryDataCallback,
metadataCaptureType,
} from './internal-types';

import { propagation, context } from '@opentelemetry/api';
import { SemanticAttributes } from '@opentelemetry/semantic-conventions';
import { AttributeNames } from '../enums/AttributeNames';
import { GRPC_STATUS_CODE_OK } from '../status-code';
import { AttributeNames } from './enums/AttributeNames';
import { GRPC_STATUS_CODE_OK } from './status-code';
import {
_grpcStatusCodeToSpanStatus,
_grpcStatusCodeToOpenTelemetryStatusCode,
_methodIsIgnored,
} from '../utils';
} from './utils';
import { errorMonitor } from 'events';

/**
* Parse a package method list and return a list of methods to patch
* with both possible casings e.g. "TestMethod" & "testMethod"
*/
export function getMethodsToWrap(
this: GrpcJsInstrumentation,
this: GrpcInstrumentation,
client: typeof Client,
methods: { [key: string]: { originalName?: string } }
): string[] {
Expand Down
Loading

0 comments on commit 366d6e1

Please sign in to comment.