How to use the @opentelemetry/core.hrTimeToMilliseconds function in @opentelemetry/core

To help you get started, we’ve selected a few @opentelemetry/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github open-telemetry / opentelemetry-js / packages / opentelemetry-exporter-jaeger / src / transform.ts View on Github external
(event): Log => {
      const fields: Tag[] = [{ key: 'message.id', value: event.name }];
      const attrs = event.attributes;
      if (attrs) {
        Object.keys(attrs).forEach(attr =>
          fields.push({ key: attr, value: toTagValue(attrs[attr]) })
        );
      }
      return { timestamp: hrTimeToMilliseconds(event.time), fields };
    }
  );