Skip to content

[baseserver] Initialize tracer with server #16586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 3, 2023
Merged

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented Feb 27, 2023

Description

This change extends base-server to automatically initialize tracing as part of the server. It also adds a convenience method to retrieve the tracer with server.Tracer() rather than grabbing it from the global opentracing.GlobalTracer() namespace.

Related Issue(s)

Fixes #

How to test

  • Existing tests for the lifecycle of baseserver cover the tracer being created, and closed
  • Preview env

Release Notes

NONE

Documentation

Build Options:

  • /werft with-github-actions
    Experimental feature to run the build with GitHub Actions (and not in Werft).
  • leeway-no-cache
    leeway-target=components:all
  • /werft no-test
    Run Leeway with --dont-test
Publish Options
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer Options
  • with-ee-license
  • with-slow-database
  • with-dedicated-emulation
  • with-ws-manager-mk2
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated

Preview Environment Options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

/hold

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-mp-baseserver-tracer.1 because the annotations in the pull request description changed
(with .werft/ from main)

@easyCZ easyCZ requested review from a team February 27, 2023 19:56
@roboquat roboquat added size/XXL and removed size/M labels Feb 27, 2023
@github-actions github-actions bot added team: webapp Issue belongs to the WebApp team team: workspace Issue belongs to the Workspace team team: IDE team: security-infrastructure-and-delivery labels Feb 27, 2023
@easyCZ
Copy link
Member Author

easyCZ commented Feb 28, 2023

/werft run with-clean-slate-deployment=true

👍 started the job as gitpod-build-mp-baseserver-tracer.4
(with .werft/ from main)

@easyCZ
Copy link
Member Author

easyCZ commented Feb 28, 2023

/werft run with-clean-slate-deployment=true

👍 started the job as gitpod-build-mp-baseserver-tracer.5
(with .werft/ from main)

Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, deployment works and log look 👌 : ✔️

(although these big PRs that touch a gazillion .sum/.mod files scare me a bit 😬 )

Copy link
Contributor

@mads-hartmann mads-hartmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. There are conflicts now - approving just so you don't have to chase down reviews after having resolved them

@easyCZ easyCZ force-pushed the mp/baseserver-tracer branch from 59b2b83 to 12d0016 Compare March 2, 2023 20:00
@mustard-mh
Copy link
Contributor

mustard-mh commented Mar 3, 2023

/werft run

👍 started the job as gitpod-build-mp-baseserver-tracer.7
(with .werft/ from main)

@mustard-mh
Copy link
Contributor

mustard-mh commented Mar 3, 2023

/werft run

👍 started the job as gitpod-build-mp-baseserver-tracer.8
(with .werft/ from main)

@mustard-mh
Copy link
Contributor

mustard-mh commented Mar 3, 2023

/werft run recreate-vm

👍 started the job as gitpod-build-mp-baseserver-tracer.9
(with .werft/ from main)

Copy link
Contributor

@mustard-mh mustard-mh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workspace can be started in preview env

❓ But honeycomb shows nothing don't know how to verify it

gitpod /workspace/gitpod (mp/baseserver-tracer) $ kubectl get configmap otel-collector -n monitoring-satellite -o yaml | grep preview.name -C 3
    processors:
      attributes:
        actions:
          - key: 'preview.name'
            value: mp-baseserver-tracer
            action: insert
    exporters:

@easyCZ
Copy link
Member Author

easyCZ commented Mar 3, 2023

So this change only binds the Tracer. We don't use it in the public-api yet so we won't yet have traces showing up

@easyCZ
Copy link
Member Author

easyCZ commented Mar 3, 2023

/unhold

@roboquat roboquat merged commit e4e0514 into main Mar 3, 2023
@roboquat roboquat deleted the mp/baseserver-tracer branch March 3, 2023 13:57
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed: IDE IDE change is running in production deployed: workspace Workspace team change is running in production labels Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed: webapp Meta team change is running in production deployed: workspace Workspace team change is running in production release-note-none size/XXL team: IDE team: security-infrastructure-and-delivery team: staff-engineers team: webapp Issue belongs to the WebApp team team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants