Comments (6)
Here are some definitions I wrote for a project (some options are missing):
declare module 'lightstep-tracer' {
import * as opentracing from 'opentracing'
export interface TracerOptions {
/** the project access token */
access_token: string
/** the string identifier for the application, service, or process */
component_name: string
/**
* controls the level of logging to the console
*
* - 0 - the client library will never log to the console
* - 1 - error reporting will be throttled to the first error per minute
* - 2 - all errors are logged to the console
* - 3 - all errors, warnings, and info statements are logged to the console
* - 4 - all log statements, including debugging details
*
* @default 1
*/
verbosity?: number
/** custom collector hostname */
collector_host?: string
/** custom collector port */
collector_port?: number
/** custom collector base path (if served behind a reverse proxy) */
collector_path?: string
}
export class Tracer extends opentracing.Tracer {
constructor(options: TracerOptions)
public startSpan(name: string, options?: opentracing.SpanOptions): Span
}
class Span extends opentracing.Span {
public generateTraceURL(): string
}
}
from lightstep-tracer-javascript.
@DeTeam , admittedly I'm not a TypeScript expert but if it's conventional to host typedefs along with the JS code, I'd be glad to accept the addition!
from lightstep-tracer-javascript.
@felixfbecker
Any chance you can add this to DefinitelyTyped or make a PR to this package to add a index,d.ts file?
from lightstep-tracer-javascript.
@bcronin a nice way to get correct type is to have the project in typescript. 😄
from lightstep-tracer-javascript.
@mlavina you're welcome to take my code above and do that :)
from lightstep-tracer-javascript.
Since the above MR is merged, can this issue be closed?
from lightstep-tracer-javascript.
Related Issues (20)
- Add trace-context header support
- Clock skew correction should take into account wrong window.performance time on browser platform HOT 1
- [Chrome] lighstep-tracer triggers browser errors: `Security Error: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.` HOT 1
- Support for reporter tags HOT 2
- Page fails to load on IE11 with lightstep-tracer 0.24.3
- Enable `global-require` lint
- Extract babel config from Makefile / webpack config
- SameSite Cookie attributes
- Optionally _clearBuffer on _reportErrorStreak Threshold
- No way to create a custom propagator HOT 1
- Make and use getters on SpanContext
- React Native crash when it tries to access or add cookies. Error: 'document is undefined'.' HOT 2
- Browser friendly lightweight distribution HOT 3
- Broken in Edge 18 due to spread in object literal HOT 2
- Only half of the traceid is used when using the LightstepPropagator. HOT 2
- lightstep-tracer-javascript latest version contains high severity vulnerability of underscore package HOT 3
- Prototype Pollution in async HOT 2
- Update dependencies in order to fix security vulnerabilities HOT 1
- Support for ot-tracer-sampled HOT 1
- Default value for `sampling.priority` tag?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightstep-tracer-javascript.