Skip to content

Commit

Permalink
ref(server): Remove metered actix_web client connector (#1021)
Browse files Browse the repository at this point in the history
Since we no longer use the actix_web HTTP client, we can remove the metered
client connector.
  • Loading branch information
jan-auer authored Jun 17, 2021
1 parent 9fd1a43 commit afd8dc6
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 118 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

- All fields in breakdown config should be camelCase, and rename the breakdown key name in project options. ([#1020](https://github.com/getsentry/relay/pull/1020))

**Bug Fixes**:

- Remove connection metrics reported under `connector.*`. They have been fully disabled since version `21.3.0`. ([#1021](https://github.com/getsentry/relay/pull/1021))

## 21.6.1

- No documented changes.
Expand Down
85 changes: 0 additions & 85 deletions relay-server/src/actors/connector.rs

This file was deleted.

1 change: 0 additions & 1 deletion relay-server/src/actors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
//! .expect("failed to start relay");
//! ```
pub mod connector;
pub mod controller;
pub mod envelopes;
pub mod healthcheck;
Expand Down
27 changes: 0 additions & 27 deletions relay-server/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,6 @@ pub enum RelayHistograms {
///
/// There is no limit to the number of cached projects.
ProjectStateCacheSize,
/// The number of upstream requests queued up for a connection in the connection pool.
///
/// Relay uses explicit queueing for most requests. This wait queue should almost always be
/// empty, and a large number of queued requests indicates a severe bug.
ConnectorWaitQueue,
/// The number of upstream requests queued up for sending.
///
/// Relay employs connection keep-alive whenever possible. Connections are kept open for _15_
Expand Down Expand Up @@ -147,7 +142,6 @@ impl HistogramMetric for RelayHistograms {
RelayHistograms::ProjectStateRequestBatchSize => "project_state.request.batch_size",
RelayHistograms::ProjectStateReceived => "project_state.received",
RelayHistograms::ProjectStateCacheSize => "project_cache.size",
RelayHistograms::ConnectorWaitQueue => "connector.wait_queue",
RelayHistograms::UpstreamMessageQueueSize => "http_queue.size",
RelayHistograms::UpstreamRetries => "upstream.retries",
}
Expand Down Expand Up @@ -437,22 +431,6 @@ pub enum RelayCounters {
/// be used to ingest events. Once the grace period expires, the cache is evicted and new
/// requests wait for an update.
EvictingStaleProjectCaches,
/// Number of requests that reused an already open upstream connection.
///
/// Relay employs connection keep-alive whenever possible. Connections are kept open for _15_
/// seconds of inactivity or _75_ seconds of activity.
ConnectorReused,
/// Number of upstream connections opened.
ConnectorOpened,
/// Number of upstream connections closed due to connection timeouts.
///
/// Relay employs connection keep-alive whenever possible. Connections are kept open for _15_
/// seconds of inactivity or _75_ seconds of activity.
ConnectorClosed,
/// Number of upstream connections that experienced errors.
ConnectorErrors,
/// Number of upstream connections that experienced a timeout.
ConnectorTimeouts,
/// An event has been produced to Kafka for one of the configured "internal" projects.
#[cfg(feature = "processing")]
InternalCapturedEventStoreActor,
Expand Down Expand Up @@ -484,11 +462,6 @@ impl CounterMetric for RelayCounters {
RelayCounters::Requests => "requests",
RelayCounters::ResponsesStatusCodes => "responses.status_codes",
RelayCounters::EvictingStaleProjectCaches => "project_cache.eviction",
RelayCounters::ConnectorReused => "connector.reused",
RelayCounters::ConnectorOpened => "connector.opened",
RelayCounters::ConnectorClosed => "connector.closed",
RelayCounters::ConnectorErrors => "connector.errors",
RelayCounters::ConnectorTimeouts => "connector.timeouts",
#[cfg(feature = "processing")]
RelayCounters::InternalCapturedEventStoreActor => "internal.captured.event.store_actor",
RelayCounters::InternalCapturedEventEndpoint => "internal.captured.event.endpoint",
Expand Down
5 changes: 0 additions & 5 deletions relay-server/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use relay_common::clone;
use relay_config::Config;
use relay_redis::RedisPool;

use crate::actors::connector::MeteredConnector;
use crate::actors::controller::{Configure, Controller};
use crate::actors::envelopes::EnvelopeManager;
use crate::actors::healthcheck::Healthcheck;
Expand Down Expand Up @@ -304,10 +303,6 @@ pub fn start(config: Config) -> Result<Recipient<server::StopServer>, ServerErro
shutdown_timeout: config.shutdown_timeout(),
});

// Start the connector before creating the ServiceState. The service state will spawn Arbiters
// that immediately start the authentication process. The connector must be available before.
MeteredConnector::start(config.clone());

let state = ServiceState::start(config.clone())?;
let mut server = server::new(move || make_app(state.clone()));
server = server
Expand Down

0 comments on commit afd8dc6

Please sign in to comment.