{"id":13806459,"url":"https://github.com/shareed2k/fiber_tracing","last_synced_at":"2025-04-12T08:18:49.126Z","repository":{"id":41432791,"uuid":"260239354","full_name":"Shareed2k/fiber_tracing","owner":"Shareed2k","description":"fiber_tracing is middleware for fiber framework","archived":false,"fork":false,"pushed_at":"2024-03-27T14:26:06.000Z","size":61,"stargazers_count":12,"open_issues_count":4,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T08:18:43.202Z","etag":null,"topics":["fiber-framework","jaeger","middleware","opentracing","tracing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Shareed2k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-30T14:49:10.000Z","updated_at":"2024-03-12T15:21:46.000Z","dependencies_parsed_at":"2024-02-09T07:29:15.051Z","dependency_job_id":"2a54f22c-a65d-4638-8216-9baceccb5609","html_url":"https://github.com/Shareed2k/fiber_tracing","commit_stats":{"total_commits":11,"total_committers":4,"mean_commits":2.75,"dds":0.2727272727272727,"last_synced_commit":"8564e74f17b502ba950325f812dbddc19f3464ce"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shareed2k%2Ffiber_tracing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shareed2k%2Ffiber_tracing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shareed2k%2Ffiber_tracing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shareed2k%2Ffiber_tracing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shareed2k","download_url":"https://codeload.github.com/Shareed2k/fiber_tracing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248537192,"owners_count":21120711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fiber-framework","jaeger","middleware","opentracing","tracing"],"created_at":"2024-08-04T01:01:12.038Z","updated_at":"2025-04-12T08:18:49.106Z","avatar_url":"https://github.com/Shareed2k.png","language":"Go","funding_links":[],"categories":["⚙️ Middlewares"],"sub_categories":["🌱 Third Party"],"readme":"## fiber_tracing is middleware for fiber framework\n\nfiber_tracing Middleware trace requests on [Fiber framework](https://gofiber.io/) with OpenTracing API.\nYou can use every tracer that implement OpenTracing interface\n\n### Install\n```\ngo get -u github.com/gofiber/fiber\ngo get -u github.com/shareed2k/fiber_tracing\n```\n\n### Config\n| Property | Type | Description | Default |\n| :--- | :--- | :--- | :--- |\n| Tracer | `opentracing.Tracer` | initializes an opentracing tracer., possible values: `jaeger`, `lightstep`, `instana`, `basictracer-go`, ... | `\"\u0026opentracing.NoopTracer{}\"` |\n| OperationName | `func(*fiber.Ctx) string` | Span operation name | `\"HTTP \" + ctx.Method() + \" URL: \" + ctx.Path()` |\n| ComponentName | `string` | Used for describing the tracing component name | `fiber/v2` |\n| ParentSpanKey | `string` | context key string used to get span scoped to the request  | `#defaultTracingParentSpanKey` |\n| Filter | `func(*fiber.Ctx) bool` | Defines a function to skip middleware. | `nil` |\n| Modify | `func(*fiber.Ctx, opentracing.Span)` | Defines a function to edit span like add tags or logs... | `span.SetTag(\"http.remote_addr\", ctx.IP()) ...` |\n\n### Example\n```go\npackage main\n\nimport (\n\t\"github.com/gofiber/fiber\"\n\t\"github.com/shareed2k/fiber_tracing\"\n\t\"github.com/uber/jaeger-client-go/config\"\n)\n\nfunc main() {\n\tapp := fiber.New()\n\n\tdefcfg := config.Configuration{\n\t\tServiceName: \"fiber-tracer\",\n\t\tSampler: \u0026config.SamplerConfig{\n\t\t\tType:  \"const\",\n\t\t\tParam: 1,\n\t\t},\n\t\tReporter: \u0026config.ReporterConfig{\n\t\t\tLogSpans:            true,\n\t\t\tBufferFlushInterval: 1 * time.Second,\n\t\t},\n\t}\n\tcfg, err := defcfg.FromEnv()\n\tif err != nil {\n\t\tpanic(\"Could not parse Jaeger env vars: \" + err.Error())\n\t}\n\ttracer, closer, err := cfg.NewTracer()\n\tif err != nil {\n\t\tpanic(\"Could not initialize jaeger tracer: \" + err.Error())\n\t}\n\n\tdefer closer.Close()\n\n\tapp.Use(fiber_tracing.NewWithConfig(fiber_tracing.Config{\n\t\tTracer: tracer,\n\t}))\n\n\t// or\n\t/*\n\tapp.Use(fiber_tracing.New(tracer))\n\t*/\n\n\tapp.Get(\"/\", func(c *fiber.Ctx) {\n\t\tc.Send(\"Welcome!\")\n\t})\n\n\tapp.Listen(3000)\n}\n```\n\n### Example 2 with jaeger default tracer\n```go\npackage main\n\nimport (\n\t\"github.com/gofiber/fiber\"\n\t\"github.com/shareed2k/fiber_tracing\"\n\t\"github.com/uber/jaeger-client-go/config\"\n)\n\nfunc main() {\n\tapp := fiber.New()\n\n\tcloser := fiber_tracing.NewWithJaegerTracer(app)\n\tdefer closer.Close()\n\n\tapp.Get(\"/\", func(c *fiber.Ctx) {\n\t\tc.Send(\"Welcome!\")\n\t})\n\n\tapp.Listen(3000)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshareed2k%2Ffiber_tracing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshareed2k%2Ffiber_tracing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshareed2k%2Ffiber_tracing/lists"}