Skip to content

Commit

Permalink
chore: change location of types
Browse files Browse the repository at this point in the history
  • Loading branch information
david-luna committed Feb 12, 2024
1 parent f63558a commit c647a47
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 13 deletions.
6 changes: 2 additions & 4 deletions packages/mockotlpserver/lib/normalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ const statusCodeEnumFromVal = {
* to a value for converting 'attributes' to a simpler object, e.g.:
* { 'telemetry.sdk.version': '1.19.0',
* 'process.pid': 19667 }
*/

/**
* @param {import('../opentelemetry/proto').opentelemetry.proto.common.v1.IAnyValue} v
*
* @param {import('./types-proto').opentelemetry.proto.common.v1.IAnyValue} v
* @returns {any}
*/
function normAttrValue(v) {
Expand Down
2 changes: 0 additions & 2 deletions packages/mockotlpserver/lib/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import type EventEmitter from 'events';

type Long = { low: number; high: number; unsigned: boolean };
type StringValue = { stringValue: string };
type IntValue = { intValue: Long };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,3 @@ https://github.com/open-telemetry/opentelemetry-proto.git at the following tag/h

This will be kept in sync wth the version being used in opentelemetry-js repository
https://github.com/open-telemetry/opentelemetry-js.git

The import paths of such files have been modified to be relative to avoid issues
when loading them with `protobufjs` library. Once the library issue is resolved
the files will be extracted "as is" from the repository.

Ref: https://github.com/protobufjs/protobuf.js/issues/1971
2 changes: 1 addition & 1 deletion scripts/update-protos.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const generateCommand = [
'|',
// Then generate types
join(binPath, 'pbts'),
`-o ${rootPath}/packages/mockotlpserver/opentelemetry/proto.d.ts`,
`-o ${rootPath}/packages/mockotlpserver/lib/types-proto.d.ts`,
`-`,
].join(' ');

Expand Down

0 comments on commit c647a47

Please sign in to comment.