Jump to content

확장 기능:ApiFeatureUsage

From mediawiki.org
This page is a translated version of the page Extension:ApiFeatureUsage and the translation is 3% complete.
미디어위키 확장 기능 설명서
ApiFeatureUsage
출시 상태: 안정
구현 특수 문서 , API
설명 Access API feature usage log summaries
만든 이 Brad Jorsch (Anomie토론)
최신 버전 1.0 (2016-12-07)
호환성 정책 스냅샷은 미디어위키와 함께 릴리스됩니다. Master is not backward compatible.
MediaWiki 1.25+
PHP 5.5.9+
데이터베이스 변경 아니오
가상 도메인 virtual-apifeatureusage
  • $wgApiFeatureUsageQueryEngineConf
Licence GNU General Public License 2.0 or later
다운로드
ApiFeatureUsage 확장 기능 번역
이슈 미해결 작업 · 버그 보고

The ApiFeatureUsage extension adds a special page and an API module to fetch summaries of data logged by ApiBase::logFeatureUsage(), which is typically an indication of use of deprecated API features.

Dependencies

Log data must be added to some sort of storage system. Currently Elasticsearch is supported via Extension:Elastica .

Installation

  • 파일을 다운로드하고 ApiFeatureUsage 폴더를 extensions/ 디렉토리에 넣어 주세요.
    개발자와 코딩 기여자는 Git을 이용해 확장기능을 다운받는 것이 좋습니다.
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage
    
  • 아래의 코드를 LocalSettings.php 코드의 마지막에 추가합니다.
    wfLoadExtension( 'ApiFeatureUsage' );
    
  • Yes 완료 – 위키의 ‘Special:Version’에 이동해서, 확장기능이 올바르게 설치된 것을 확인합니다.

Configuration

Parameters
Name Description
$wgApiFeatureUsageQueryEngineConf Configuration array for accessing the log storage backend.
class
Backend access class to instantiate. Either this or factory is required.
factory
PHP callable which must return an instance of a backend access class. Either this or class is required.
Elastica backend (ApiFeatureUsageQueryEngineElastica)

Additional configuration values in $wgApiFeatureUsageQueryEngineConf:

serverList
Array of Elasticsearch servers. Required.
maxConnectionAttempts
Maximum connection attempts, default 1.
indexPrefix
Prefix for the indexes to use. Default "apifeatureusage-".
indexFormat
Date formatting for the indexes to use, see the PHP manual. Default "Y.m.d".
type
Elasticsearch type to query. Default "api-feature-usage-sanitized".
featureField
Field name for the logged value of $feature. Default "feature".
timestampField
Field name for the logged timestamp. Default "@timestamp".
agentField
Field name for the logged user agent. Default "agent".

Usage

The extension adds a new special page, Special:ApiFeatureUsage, with a simple form to request a summary of feature usage logs for a user agent and date range.

The extension also adds an API query submodule, meta=featureusage. See the auto-generated API documentation for details.

See also