Skip to content
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

🔧 Instrument gateway process #256

Merged
merged 2 commits into from
May 19, 2024

Conversation

gernest
Copy link
Collaborator

@gernest gernest commented May 10, 2024

Closes #224

@@ -68,6 +70,17 @@ func NewGateway(configProvider *config.Provider) (*Gateway, error) {

// Run starts and runs the gateway according to given configuration
func (gw *Gateway) Run(ctx context.Context) error {
// Instrument the gateway process
err := host.Start()
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to call some Stop() method as well? I'm wondering how this would work on service shutdown

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do we need to call some Stop() method as well?

nope!

otel api is callback based, basically the host.Start call registers callback on the global otel providers.

@@ -9,6 +9,8 @@ import (

"github.com/EinStack/glide/pkg/routers"
"github.com/EinStack/glide/pkg/version"
"go.opentelemetry.io/contrib/instrumentation/host"
Copy link
Member

Choose a reason for hiding this comment

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

This's actually very they have in-proc metrics as standard instrumentations 🙌

* develop:
  🔧 💥 EinStack#235: Extended the non-streaming chat error schema with new fields to give clients more context around the error (EinStack#236)
  🔧 EinStack#220 Instrument API server (EinStack#255)
  🔧 EinStack#248 Disable span and metrics by default (EinStack#254)
@gernest
Copy link
Collaborator Author

gernest commented May 18, 2024

@roma-glushko PTAL

@roma-glushko roma-glushko added area:service area:telemetry Logging, metrics, traces labels May 19, 2024
@roma-glushko roma-glushko changed the title Instrument gateway process 🔧 Instrument gateway process May 19, 2024
@roma-glushko roma-glushko merged commit 8986edb into EinStack:develop May 19, 2024
6 checks passed
roma-glushko added a commit that referenced this pull request Jun 24, 2024
The first major update with breaking changes to the language chat schemas 
and begging of work on instrumenting the gateway with OpenTelemetry.

### Added

- 🔧 Use github.com/EinStack/glide as module name to support go install cmd (@gernest)
- ✨🔧 Setup Open Telemetry Metrics and Traces (#237) (@gernest)
-  🔧 #221 Add B3 trace propagator (#242) (@gernest)
- 🔧 #241 Support overriding OTEL resource attributes (#243) (@gernest)
- 🔧 #248 Disable span and metrics by default (#254) (@gernest)
- 🔧 #220 Instrument API server with observability signals (#255) (@gernest)
- 🔧 #164 Make client connection pool configurable across all providers (#251) (@daesu)
- 🔧 Instrument gateway process (#256) (@gernest)
- 🔧 #262: adding connection pool for chat request and response (#271) (@tom-fitz)

### Changed

- 🔧 #238 Implements human-readable durations in config (#253) (@ppmdo)
- 🔧 #266: removing omitempty from response definition (#267) (@tom-fitz)

#### Breaking Changes

- 🔧 💥 #235: Extended the non-streaming chat error schema with new fields to give clients more context around the error (#236) (@roma-glushko)
- 💥 Convert all camelCase config fields to the snake_case in the provider configs (#260) (@roma-glushko)
- ✨💥 #153: Allow to pass multiple model-specific param overrides (#264) (@roma-glushko)

### Fixed

- 🐛 #217: Set build info correctly in Glide images (#218) (@roma-glushko)

### Security

- 🔒 Updated golang to 1.22.4 to address CVE-2024-24790 (#276) (@STAR-173)

### Miscellaneous

- 📝 Defined a way to manage EinStack Glide project (#234) (@roma-glushko)
- 👷 #219: Setup local telemetry stack with Jaeger, Grafana, VictoriaMetrics and OTEL Collector (#225) (@roma-glushko)
- 👷‍♂️ Added a new GH action to watch for glide activity stream (#239, #244) (@roma-glushko)
- ✨ Switched to the new docs (@roma-glushko)
- 🔧 #240: Automatically install air (#277, #270) (@ppmdo, @roma-glushko)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:service area:telemetry Logging, metrics, traces
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🔧 [Telemetry] Add in-process gateway metrics
2 participants