Permalink
Browse files

util-events: Deprecate in preparation for removal

Summary: Problem

`util-events` has not seen the adoption I had hoped for.

Solution

Deprecate the code and remove the wiring from finagle-stats and
finagle-zipkin-core. A future release will remove the util-events code
as well as the admin endpoint in twitter-server.

JIRA Issues: csl-4758

TBR=true

Differential Revision: https://phabricator.twitter.biz/D64437
  • Loading branch information...
kevinoliver authored and jenkins committed Jun 23, 2017
1 parent 3ae0d5e commit c465fdbb2a781ad009f134305be74e49127e1cb1
View
@@ -13,6 +13,9 @@ Runtime Behavior Changes:
and will return the first failure. Synchronous exceptions are now
handled by lifting them into failed `Futures`. ``PHAB_ID=D62418``
* util-events: `com.twitter.util.events.sinkEnabled` now defaults to false
in preparation for removal in an upcoming release. ``PHAB_ID=D64437``
API Changes:
* util-core: ByteWriter has been transformed into a true trait which can now
@@ -30,6 +33,9 @@ API Changes:
Deprecations:
* util-events: This module is deprecated and will be removed in an upcoming
release. ``PHAB_ID=D64437``
* util-stats: ``PHAB_ID=D62611``
- `StatsReceiver.counter0` is deprecated in favour of vararg `StatsReceiver.counter`
@@ -3,6 +3,7 @@
/**
* Java friendly API for {@link com.twitter.util.events.Event}.
*/
@Deprecated
public final class Events {
private Events() { }
@@ -3,6 +3,7 @@
/**
* Java friendly API for {@link com.twitter.util.events.Sink}.
*/
@Deprecated
public final class Sinks {
private Sinks() { }
@@ -6,6 +6,7 @@ import com.twitter.io.Buf
/**
* Note: There is a Java-friendly API for this object: [[com.twitter.util.events.Events]].
*/
@deprecated("Will be removed in an upcoming release", "2017-06-21")
object Event {
val NoObject: AnyRef = new Object()
@@ -65,6 +66,7 @@ object Event {
* @param traceIdVal should be `Event.NoTraceId` if there is no supplied value.
* @param spanIdVal should be `Event.NoSpanId` if there is no supplied value.
*/
@deprecated("Will be removed in an upcoming release", "2017-06-21")
case class Event(
etype: Event.Type,
when: Time,
@@ -7,7 +7,7 @@ import com.twitter.util.events.Event.Type
// to ensure that their values are available very early in the application's
// lifecycle.
private[events] object sinkEnabled extends GlobalFlag[Boolean](
true,
false,
"Whether or not event capture is enabled. Prefer setting via System properties.")
private[events] object approxNumEvents extends GlobalFlag[Int](
@@ -29,6 +29,7 @@ private[events] object approxNumEvents extends GlobalFlag[Int](
* - `event` is expected to be called many orders of magnitude
* more frequently than `events`.
*/
@deprecated("Will be removed in an upcoming release", "2017-06-21")
trait Sink {
/**
@@ -94,6 +95,7 @@ trait Sink {
/**
* Note: There is a Java-friendly API for this object: [[com.twitter.util.events.Sinks]].
*/
@deprecated("Will be removed in an upcoming release", "2017-06-21")
object Sink {
/**
@@ -5,6 +5,7 @@ import com.twitter.util.events.Event.Type
import java.util.concurrent.atomic.AtomicLong
import scala.collection.mutable.ArrayBuffer
@deprecated("Will be removed in an upcoming release", "2017-06-21")
object SizedSink {
// use the next largest power of two for performance reasons.
@@ -62,6 +63,7 @@ object SizedSink {
* @param milliTime gets the current time in millis from the epoch.
* This is exposed to allow for more control in tests.
*/
@deprecated("Will be removed in an upcoming release", "2017-06-21")
class SizedSink private[events](
capacity: Int,
milliTime: () => Long)

0 comments on commit c465fdb

Please sign in to comment.