Permalink
Browse files

Rename PassengerAnalytics/passenger_analytics to UnionStationSupport/…

…union_station_support.
  • Loading branch information...
1 parent 3a49c53 commit 6d413ea6befdf6c53b416a4d305c53f8d381833c @FooBarWidget FooBarWidget committed Mar 8, 2011
View
12 NEWS
@@ -1,16 +1,20 @@
Release 3.0.5
-------------
+ * [Apache] Fixed Union Station process statistics collection
+ Union Station users that are using Apache may notice that no process
+ information show up in Union Station. This is because of a bug in
+ Phusion Passenger's Apache version, which has now been fixed.
+ * [Apache] PassengerAnalytics has been renamed to UnionStationSupport
+ This option has been renamed for consistency reasons.
+ * [Nginx] passenger_analytics has been renamed to union_station_support
+ This option has been renamed for consistency reasons.
* Fixed Union Station data on older libcurl versions
Some Union Station users have reported that their data don't show up.
Upon investigation this turned out to be a compatibility with older
libcurl versions. Affected systems include all RHEL 5 based systems,
such as RHEL 5.5 and CentOS 5.5. We've now fixed compatibility
with older libcurl versions.
- * Fixed Union Station process statistics collection on Apache
- Union Station users that are using Apache may notice that no process
- information show up in Union Station. This is because of a bug in
- Phusion Passenger's Apache version, which has now been fixed.
* Fixed a PassengerMaxPoolSize/passenger_max_pool_size violation bug
People who host a lot of different applications on Phusion Passenger
may notice that it sometimes spawns more processes than is allowed
View
12 ext/apache2/Configuration.cpp
@@ -208,7 +208,7 @@ passenger_config_create_dir(apr_pool_t *p, char *dirspec) {
config->restartDir = NULL;
config->uploadBufferDir = NULL;
config->friendlyErrorPages = DirConfig::UNSET;
- config->analytics = DirConfig::UNSET;
+ config->unionStationSupport = DirConfig::UNSET;
/*************************************/
return config;
}
@@ -258,7 +258,7 @@ passenger_config_merge_dir(apr_pool_t *p, void *basev, void *addv) {
MERGE_THREEWAY_CONFIG(resolveSymlinksInDocRoot);
MERGE_THREEWAY_CONFIG(allowEncodedSlashes);
MERGE_THREEWAY_CONFIG(friendlyErrorPages);
- MERGE_THREEWAY_CONFIG(analytics);
+ MERGE_THREEWAY_CONFIG(unionStationSupport);
/*************************************/
return config;
}
@@ -310,7 +310,7 @@ DEFINE_DIR_STR_CONFIG_SETTER(cmd_union_station_key, unionStationKey)
DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_passenger_resolve_symlinks_in_document_root, resolveSymlinksInDocRoot)
DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_passenger_allow_encoded_slashes, allowEncodedSlashes)
DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_passenger_friendly_error_pages, friendlyErrorPages)
-DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_passenger_analytics, analytics)
+DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_union_station_support, unionStationSupport)
static const char *
cmd_passenger_spawn_method(cmd_parms *cmd, void *pcfg, const char *arg) {
@@ -644,11 +644,11 @@ const command_rec passenger_commands[] = {
NULL,
RSRC_CONF,
"Prestart the given web applications during startup."),
- AP_INIT_TAKE1("PassengerAnalytics",
- (Take1Func) cmd_passenger_analytics,
+ AP_INIT_FLAG("UnionStationSupport",
+ (Take1Func) cmd_union_station_support,
NULL,
OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
- "Whether to enable analytics logging."),
+ "Whether to enable logging through Union Station."),
/*****************************/
View
6 ext/apache2/Configuration.hpp
@@ -195,7 +195,7 @@ struct DirConfig {
/**
* Whether analytics logging should be enabled.
*/
- Threeway analytics;
+ Threeway unionStationSupport;
/*************************************/
/*************************************/
@@ -329,8 +329,8 @@ struct DirConfig {
return friendlyErrorPages != DISABLED;
}
- bool analyticsEnabled() const {
- return analytics == ENABLED;
+ bool useUnionStation() const {
+ return unionStationSupport == ENABLED;
}
string getUnionStationFilterString() const {
View
10 ext/apache2/Hooks.cpp
@@ -566,7 +566,11 @@ class Hooks {
UPDATE_TRACE_POINT();
try {
AnalyticsLogPtr log;
- if (config->analyticsEnabled()) {
+ fprintf(stderr, "use union station: %d (%d)\n",
+ (int)config->useUnionStation(),
+ (int)config->unionStationSupport);
+ fflush(stderr);
+ if (config->useUnionStation()) {
log = analyticsLogger->newTransaction(
config->getAppGroupName(appRoot),
"requests",
@@ -662,7 +666,7 @@ class Hooks {
config->getRestartDir(),
DEFAULT_BACKEND_ACCOUNT_RIGHTS,
false,
- config->analyticsEnabled(),
+ config->useUnionStation(),
log->isNull() ? AnalyticsLogPtr() : log
);
options.environmentVariables = ptr(new EnvironmentVariablesStringListCreator(r));
@@ -1058,7 +1062,7 @@ class Hooks {
addHeader(headers, env[i].key, env[i].val);
}
- if (config->analyticsEnabled()) {
+ if (config->useUnionStation()) {
addHeader(headers, "PASSENGER_GROUP_NAME",
config->getAppGroupName(appRoot).c_str());
addHeader(headers, "PASSENGER_TXN_ID", log->getTxnId().c_str());
View
8 ext/nginx/Configuration.c
@@ -269,7 +269,7 @@ passenger_create_loc_conf(ngx_conf_t *cf)
conf->enabled = NGX_CONF_UNSET;
conf->use_global_queue = NGX_CONF_UNSET;
conf->friendly_error_pages = NGX_CONF_UNSET;
- conf->analytics = NGX_CONF_UNSET;
+ conf->union_station_support = NGX_CONF_UNSET;
conf->debugger = NGX_CONF_UNSET;
conf->show_version_in_header = NGX_CONF_UNSET;
conf->environment.data = NULL;
@@ -369,7 +369,7 @@ passenger_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_conf_merge_value(conf->enabled, prev->enabled, 0);
ngx_conf_merge_value(conf->use_global_queue, prev->use_global_queue, 1);
ngx_conf_merge_value(conf->friendly_error_pages, prev->friendly_error_pages, 1);
- ngx_conf_merge_value(conf->analytics, prev->analytics, 0);
+ ngx_conf_merge_value(conf->union_station_support, prev->union_station_support, 0);
ngx_conf_merge_value(conf->debugger, prev->debugger, 0);
ngx_conf_merge_value(conf->show_version_in_header, prev->show_version_in_header, 1);
ngx_conf_merge_str_value(conf->environment, prev->environment, "production");
@@ -1219,11 +1219,11 @@ const ngx_command_t passenger_commands[] = {
offsetof(passenger_loc_conf_t, app_rights),
NULL },
- { ngx_string("passenger_analytics"),
+ { ngx_string("union_station_support"),
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
ngx_conf_set_flag_slot,
NGX_HTTP_LOC_CONF_OFFSET,
- offsetof(passenger_loc_conf_t, analytics),
+ offsetof(passenger_loc_conf_t, union_station_support),
NULL },
{ ngx_string("passenger_analytics_log_dir"),
View
2 ext/nginx/Configuration.h
@@ -42,7 +42,7 @@ typedef struct {
ngx_flag_t enabled;
ngx_flag_t use_global_queue;
ngx_flag_t friendly_error_pages;
- ngx_flag_t analytics;
+ ngx_flag_t union_station_support;
ngx_flag_t debugger;
ngx_flag_t show_version_in_header;
ngx_str_t environment;
View
8 ext/nginx/ContentHandler.c
@@ -430,8 +430,8 @@ create_request(ngx_http_request_t *r)
slcf, use_global_queue);
ANALYZE_BOOLEAN_CONFIG_LENGTH("PASSENGER_FRIENDLY_ERROR_PAGES",
slcf, friendly_error_pages);
- ANALYZE_BOOLEAN_CONFIG_LENGTH("PASSENGER_ANALYTICS",
- slcf, analytics);
+ ANALYZE_BOOLEAN_CONFIG_LENGTH("UNION_STATION_SUPPORT",
+ slcf, union_station_support);
ANALYZE_BOOLEAN_CONFIG_LENGTH("PASSENGER_DEBUGGER",
slcf, debugger);
ANALYZE_BOOLEAN_CONFIG_LENGTH("PASSENGER_SHOW_VERSION_IN_HEADER",
@@ -660,8 +660,8 @@ create_request(ngx_http_request_t *r)
slcf, use_global_queue);
SERIALIZE_BOOLEAN_CONFIG_DATA("PASSENGER_FRIENDLY_ERROR_PAGES",
slcf, friendly_error_pages);
- SERIALIZE_BOOLEAN_CONFIG_DATA("PASSENGER_ANALYTICS",
- slcf, analytics);
+ SERIALIZE_BOOLEAN_CONFIG_DATA("UNION_STATION_SUPPORT",
+ slcf, union_station_support);
SERIALIZE_BOOLEAN_CONFIG_DATA("PASSENGER_DEBUGGER",
slcf, debugger);
SERIALIZE_BOOLEAN_CONFIG_DATA("PASSENGER_SHOW_VERSION_IN_HEADER",
View
6 ext/nginx/HelperAgent.cpp
@@ -437,7 +437,7 @@ class Client {
}
try {
- bool enableAnalytics = parser.getHeader("PASSENGER_ANALYTICS") == "true";
+ bool useUnionStation = parser.getHeader("UNION_STATION_SUPPORT") == "true";
StaticString appGroupName = parser.getHeader("PASSENGER_APP_GROUP_NAME");
PoolOptions options;
@@ -471,7 +471,7 @@ class Client {
UPDATE_TRACE_POINT();
AnalyticsLogPtr log;
- if (enableAnalytics) {
+ if (useUnionStation) {
log = analyticsLogger->newTransaction(
options.getAppGroupName(),
"requests",
@@ -522,7 +522,7 @@ class Client {
session->getConnectPassword().size() + 1);
end += session->getConnectPassword().size() + 1;
- if (enableAnalytics) {
+ if (useUnionStation) {
memcpy(end, "PASSENGER_GROUP_NAME", sizeof("PASSENGER_GROUP_NAME"));
end += sizeof("PASSENGER_GROUP_NAME");

0 comments on commit 6d413ea

Please sign in to comment.