1
1
package com .twitter .home_mixer .functional_component .feature_hydrator
2
2
3
- import com .twitter .config .yaml .YamlMap
4
3
import com .twitter .finagle .tracing .Annotation .BinaryAnnotation
5
4
import com .twitter .finagle .tracing .ForwardAnnotation
6
5
import com .twitter .home_mixer .model .HomeFeatures ._
7
6
import com .twitter .home_mixer .model .request .DeviceContext .RequestContext
8
7
import com .twitter .home_mixer .model .request .HasDeviceContext
9
- import com .twitter .home_mixer .param .HomeMixerInjectionNames .DDGStatsAuthors
10
8
import com .twitter .joinkey .context .RequestJoinKeyContext
11
9
import com .twitter .product_mixer .component_library .model .cursor .UrtOrderedCursor
12
10
import com .twitter .product_mixer .core .feature .Feature
@@ -24,22 +22,16 @@ import com.twitter.snowflake.id.SnowflakeId
24
22
import com .twitter .stitch .Stitch
25
23
import java .util .UUID
26
24
import javax .inject .Inject
27
- import javax .inject .Named
28
25
import javax .inject .Singleton
29
26
30
27
@ Singleton
31
28
class RequestQueryFeatureHydrator [
32
29
Query <: PipelineQuery with HasPipelineCursor [UrtOrderedCursor ] with HasDeviceContext ] @ Inject () (
33
- @ Named (DDGStatsAuthors ) ddgStatsAuthors : YamlMap )
34
- extends QueryFeatureHydrator [Query ] {
30
+ ) extends QueryFeatureHydrator [Query ] {
35
31
36
32
override val features : Set [Feature [_, _]] = Set (
37
33
AccountAgeFeature ,
38
34
ClientIdFeature ,
39
- DDGStatsDemocratsFeature ,
40
- DDGStatsRepublicansFeature ,
41
- DDGStatsElonFeature ,
42
- DDGStatsVitsFeature ,
43
35
DeviceLanguageFeature ,
44
36
GetInitialFeature ,
45
37
GetMiddleFeature ,
@@ -59,10 +51,6 @@ class RequestQueryFeatureHydrator[
59
51
override val identifier : FeatureHydratorIdentifier = FeatureHydratorIdentifier (" Request" )
60
52
61
53
private val DarkRequestAnnotation = " clnt/has_dark_request"
62
- private val Democrats = " democrats"
63
- private val Republicans = " republicans"
64
- private val Elon = " elon"
65
- private val Vits = " vits"
66
54
67
55
// Convert Language code to ISO 639-3 format
68
56
private def getLanguageISOFormatByCode (languageCode : String ): String =
@@ -83,16 +71,6 @@ class RequestQueryFeatureHydrator[
83
71
val featureMap = FeatureMapBuilder ()
84
72
.add(AccountAgeFeature , query.getOptionalUserId.flatMap(SnowflakeId .timeFromIdOpt))
85
73
.add(ClientIdFeature , query.clientContext.appId)
86
- /**
87
- * These author ID lists are used purely for metrics collection. We track how often we are
88
- * serving Tweets from these authors and how often their tweets are being impressed by users.
89
- * This helps us validate in our A/B experimentation platform that we do not ship changes
90
- * that negatively impacts one group over others.
91
- */
92
- .add(DDGStatsDemocratsFeature , ddgStatsAuthors.longSeq(Democrats ).toSet)
93
- .add(DDGStatsRepublicansFeature , ddgStatsAuthors.longSeq(Republicans ).toSet)
94
- .add(DDGStatsVitsFeature , ddgStatsAuthors.longSeq(Vits ).toSet)
95
- .add(DDGStatsElonFeature , ddgStatsAuthors.longValue(Elon ))
96
74
.add(DeviceLanguageFeature , query.getLanguageCode.map(getLanguageISOFormatByCode))
97
75
.add(
98
76
GetInitialFeature ,
0 commit comments